Aim
The goal of this activity is to operate a servo motor using an IR sensor. The servo motor will rotate by 90 degrees every time the IR sensor detects an object in its range.
Materials Required
1. Arduino UNO R3 – 1
2. USB Cable – 1
3. IR Sensor – 1
4. Servo Motor (SG90) – 1
5. Several Jumper Wires
Wiring Diagram
Desired Outcome
The servo motor will rotate by 90 degrees every time the IR sensor detects an object in its range. Once the object is not in the range, the servo motor will go back to its original position.