Arduino 5 Minute Tutorials: Lesson 5 - Servo Motors

@cbenson,
i ordered the jumper wires you mentioned and got the servo to rotate. Thank you so much for your help. I am now getting more ambitious and want to do more: I’d like to use my servo as a clock. I want to, say, move the servo once at 1 o’clock, twice at 2 o’clock, three times at 3 o’clock and so on and so forth. I think i can write the code to do this. What I need help with is how to allow users to set the time. I guess I need a switch/button to allow the user to set the hour and the minute. Based on that input, I can write the source code to compute the top of the hour and move my servo. Not sure if this is out of scope for this forum, but if you can help with that, really appreciate it

1 Like

If you want it to be a stand-alone project (i.e. not connected to a computer) consider four seven-segment displays or a small character LCD, for example:


This uses I2C communication, so you’ll need to use wires to connect it to the right pins, and learn about communicating with I2C devices.

If you want accurate time, you’d need a real time clock module (“RTC”), for example:

If you’re using Arduino, you can consider a shield:



Note that the pins are not broken out, so connecting the servo again will be a bit more difficult.

Using a ROMEO or BotBoarduino which breaks out the pins on the sides will allow for both: