1 × Arduino Uno
1 × Servo Motor
1 × Ultrasonic Sensor (HC-SR04)
Jumper Wires
Breadboard
USB Cable for Arduino
First I connected the Ultrasonic sensor with the Arduino Board in the following way:-
VCC -5V
GND-GND PIN
TRIG -2
ECHO-3
Then next I connected the servo motor as follows:-
RED wire - 5V
BROWN wire- GND
ORANGE - 4
Here, I encountered a problem where the servo motor unfortunately refused to rotate. I suspect there is an internal mechanical issue with the servo, as I tried connecting it directly to a 5V supply, but it still did not work. It only produced a very faint sound that was barely audible.