Servo motor controlled by a pushbutton momentary switch

From Knowledge Kitchen
Jump to navigation Jump to search


In this lab, you will control a servo motor from a pushbutton switch.

  • Holding down the momentary pushbutton switch turns the servo motor incrementally until it reaches its upper or lower limit (180° or 0°, respectively).
  • Once the servo reaches its upper or lower limit, it continues in the opposite direction.


The circuit

Design it yourself. There is no circuit for you to follow.


The code

Write it yourself. You may want to review how to control a servo motor from a Processing program


What links here