Controlling the Servo Motor using a Single Push Button to Rotate the servo shaft at 0°, 45°, 90°, 135°, and 180°.

Krishna Kumar Chaurasia
0

 

 Controlling the Servo motor using a Push Button at 0°, 45°, 90°, 135°, and 180°.

Components required:

  • Arduino 
  • Servo Motor
  • Push Button
  • Jumper Wire

Connections:

Servo WireConnect To (Arduino)
    Red (VCC)        5V
    Brown/Black (GND)        GND
    Orange/Yellow (Signal)        Pin 9


    Button Pin        Connect To (Arduino)
    One leg            Pin 2
    Other leg            GND

Note: 

The button connects between Pin 2 and GND. Arduino will use its internal pull-up, so when the button is not pressed, the pin reads HIGH; when pressed, the pin reads LOW.


Post a Comment

0 Comments

Post a Comment (0)
3/related/default