Gear Motor and Pot as Servo by qwertbochaffer

This sketch is missing a short description
http://dronecolony.com/2008/07/24/diy-servo-with-arduino-dc-motor-and-potentiometer/ The basic idea is to remove the controller from a servo entirely, modify the gears for continuous movement by removing any stop pins, and attach the potentiometer directly to the arduino. If we then attach the motor to a motor controller (in my case, an L298 Compact Motor Controller) – we can now control direction and speed. By using analogRead() with the wiper of the potentiometer, we’ll have 1024 discreet positions we can read in a single rotation. Or, about 0.35 degrees as a minimum movement.

Embed This Sketch

Use the following HTML code to embed the sketch code above in your blog or website.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:274516" frameborder="0"></iframe>

Embed The Serial Monitor

You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>