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.
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
Building
- Place a wire on D2 of Arduino and D21 of breadboard
- Place Terminal 1A of Button on E21 of breadboard
- Place a 10k resistor on negative rail 23 and B23 of breadboard
- Place a wire on D9 of Arduino and D10 of breadboard
- Place Terminal 1A of Button on E10 of breadboard
- Place a 10k resistor on negative rail 12 and B12 of breadboard
- Place GND micro servo wire on Negative rail 1
- Place power micro servo wire on Positive rail 1
- Place Signal micro servo wire on D9 of Arduino
- Place a wire on 5V on Arduino and Positive rail 30 of breadboard
- Place a wire on GND on Arduino and Negative rail 9 of breadboard
Coding
After building your circuit input this code into your Arduino UNO
Downloads
Testing
Test and troubleshoot if anything is wrong and refer to the images above for help.