Introduction: Controlling a Servo Motor With Two Buttons and Arduino.

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

2 / 10k resistors

2 / Pushbuttons 12mm

8 / Jumper Wires

1 / Breadboard

1 / Arduino UNO

1 / SG90 Micro-Servo Motor

Step 1: Building

  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

Step 2: Coding

After building your circuit input this code into your Arduino UNO

Step 3: Testing

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