Wire up the sensor and servo according to the wiring diagram.
Then VCC -> 5V on the Arduino
Trig -> Pin 9 on the Arduino
Echo -> Pin 10 on the Arduino
GND -> GND on the Arduino
For the Servo Motor, use the Male / Male wires to connect the following:
Red Servo Wire (5V) -> Vin on the Arduino
Black Servo Wire (GND) -> GND on the Arduino
Orange Servo Wire (Signal) -> Pin 7 on the Arduino
Assemble the Timer
Cut out a servo sized hole
open the Arduino software Make sure to install the NewPing, EWMA, and Queue libraries from the Arduino library manager before running the sketch!
Comments