C Programming for Microcontrollers – Featuring ATMEL’s AVR Butterfly and the free WinAVR Compiler
Introduction
C Programming and microcontrollers are two big topics, practically continental in size, and like continents, are easy to get lost in. Combining the two is a little like traipsing from Alaska to Tierra del Fuego. Chances are you’ll get totally lost and if the natives don’t eat you, your infected blisters will make you want to sit and pout. I’ve been down this road so much that I probably have my own personal rut etched in the metaphorical soil, and I can point to all the sharp rocks I’ve stepped on, all the branches that have whacked me in the face, and the bushes from which the predators leapt. If you get the image of a raggedy bum stumbling through the jungle, you’ve got me right. Consider this book a combination roadmap, guidebook, and emergency first aid kit for your journey into this fascinating, but sometimes dangerous world.
I highly recommend that you get the book, ‘The C Programming Language – second edition’ by Kernighan and Ritchie, here after referred to as K&R. Dennis Ritchie, Figure 1, wrote C, and his book is the definitive source on all things C.

Build a robot is not difficult as you think… With no experience in electronics, you can make a robot easily in 2 hours
Ho it can be..?
Making schematics and pcb layout will be easier with this program.
Autorouting is included in this program. So you can create PCB layout automatically.
Click this link to find more about Diptrace
Choosing DC motors is not simple as it says. You need to calculate the velocoty, voltage, current and the most important is… torque… I’ve some experience about choosing the DC motor for my robots. Sometime my robot going wild with high velocity motor and low torque motor. Sometime my robot is to slow but the acceleration is very good, so easy to be controlled.
If you build a robot, you must pay attention about this tutorial.

From the start, DC motors seem quite simple. Apply a voltage to both terminals, and weeeeeeee it spins. But what if you want to control which direction the motor spins? Correct, you reverse the wires. Now what if you want the motor to spin at half that speed? You would use less voltage. But how would you get a robot to do those things autonomously? How would you know what voltage a motor should get? Why not 50V instead of 12V? What about motor overheating? Operating motors can be much more complicated than you think.
H-Bridge is a must used for your robot to control the motors… the speed and the direction of each motor. There are many kinds of H-Bridge. For low current DC motor, you can use IC L293D or L298N to drive your motor. For motors which need high voltage and current, see below H-Bridge tutorial…
The H-Bridge is the link between digital circuitry and mechanical action. The computer sends out binary commands, and high powered actuators do stuff. Most often H-bridges are used to control rotational direction of DC motors. And unless you buy a potentially expensive motor-driver, you need an H-bridge to control any robot with a motor.
This is a quickly sketched H-Bridge circuit with supporting circuitry.