Introduction: Servo Positioning Final
In this tutorial, you will learn how to adjust the position of a servo by using the keypad to input positions.
If a Non-Numeric number is pressed, the position will be set to 0. If the C button is pressed, the position will be set to 0, and the inputs will be reset.
Step 1: Attach a Keypad
Connect the keypad to the pins on the Arduino.
1. With the keypad facing up, connect a wire from the far left pin on the keypad to pin 9 on the Arduino.
2. Continue attaching wires from left to right on the keypad into the pins on the Arduino in descending order from 9 to 2.
Step 2: Attach Servo
Attach a servo to your Arduino.
1. Connect a wire from the data pin on the servo (yellow wire) to pin 10 on the Arduino
2. Connect a wire from the ground pin on the servo to the ground pin on the Arduino.
3. Connect a wire from the power pin on the servo to the power pin on the Arduino.
Step 3: Run the Code!
Run the KeypadServoFinal.ino file in the Arduino IDE. The comments will explain what the code does.