How can I create redstone circuits with code?

Edited

Place the blocks using Tynkerbot! For a step-by-step guide, login at tynker.com, then visit Minecraft > Mods and find the tutorial called TNT Cannon. This redstone-powered TNT launcher is triggered using a pressure plate.

Want to work on your own? You can try Tynkerbot commands like these!