This is my first post on the forum. I am currently building a self balancing robot. I am new to robotics and have brought a USB arduino clone. I am still to go to the sensors stage but I am working out the basics. Using the arduino I have managed to run 2 dc Motors using an L293D HBridge IC and have managed to reverse the direction of rotation using a switch. Can somebody guide me on how to proceed to control the speed of the DC motors using my arduino (the motors are 12V and around 100rpm). My initial guess is that this will be done by PWM but I am not sure how to proceed with the hardware circuitry and the programming of the code. I want to control the speed of the motor and not just forward, reverse, and stop. How can it be done using a breadboard and a setup similar to the one used in making them run with an L293D? http://itp.nyu.edu/physcomp/Labs/DCMotorControl
I tried learning from the fading led sketch but was unsuccessful since the led simply lit up and lit off at a particular potentiometer value. Any one know why this is happening?