Other Things to Do

Open the 'sweep' sketch and try reducing the delays from 15 milliseconds to say 5 milliseconds. Notice how much faster the servo turns.

 Try modifying the 'knob' sketch so that instead of taking the servo angle from the position of the knob, it takes it from the Serial Monitor, so that you can control the servo from your computer.

Hint: to make your sketch read the number of degrees from the Serial Monitor, you can use the function Serial.parseInt(). This reads a number from the Serial Monitor.
About the Author

Simon Monk is author of a number of books relating to Open Source Hardware. The following books written by Simon are available from Adafruit: Programming Arduino, 30 Arduino Projects for the Evil Genius and Programming the Raspberry Pi.
Last updated on 2015-05-04 at 04.27.11 PM Published on 2012-12-18 at 09.56.58 AM