Controlling a Servo Motor With Two Buttons and Arduino.

by 802137 in Circuits > Arduino

57 Views, 1 Favorites, 0 Comments

Controlling a Servo Motor With Two Buttons and Arduino.

unnamed.jpg
unnamed.png

I've made a servo motor that is controlled with two buttons. these buttons make the circuit move left and right. I made this for a school project. And now I will show you how to make this circuit.

Original Creator (bruno_opaiva) : https://projecthub.arduino.cc/bruno_opaiva/controling-servo-motors-with-buttons-and-arduino-bcb3b6

Supplies

unnamed (1).png

2 / 10k resistors

2 / Pushbuttons 12mm

8 / Jumper Wires

1 / Breadboard

1 / Arduino UNO

1 / SG90 Micro-Servo Motor

Building

unnamed.png
unnamed (1).jpg
  1. Place a wire on D2 of Arduino and D21 of breadboard
  2. Place Terminal 1A of Button on E21 of breadboard
  3. Place a 10k resistor on negative rail 23 and B23 of breadboard
  4. Place a wire on D9 of Arduino and D10 of breadboard
  5. Place Terminal 1A of Button on E10 of breadboard
  6. Place a 10k resistor on negative rail 12 and B12 of breadboard
  7. Place GND micro servo wire on Negative rail 1
  8. Place power micro servo wire on Positive rail 1
  9. Place Signal micro servo wire on D9 of Arduino
  10. Place a wire on 5V on Arduino and Positive rail 30 of breadboard
  11. Place a wire on GND on Arduino and Negative rail 9 of breadboard

Coding

unnamed (2).jpg

After building your circuit input this code into your Arduino UNO

Downloads

Testing

Screenshot 2025-01-22 08.29.57.png

Test and troubleshoot if anything is wrong and refer to the images above for help.

Downloads