Question: Task 1 : Servo motor control using a potentiometer Connect the servo motor and potentiometer to the Arduino as below. Write down your code to

Task 1: Servo motor control using a potentiometer
Connect the servo motor and potentiometer to the Arduino as below. Write down your code to control the servo position using a potentiometer.
Task 2: Smart Gate system using Ultrasonic sensor
2.1 Design a home smart gate using Ultrasonic sensor and servo using an Arduino microcontroller. The ultrasonic distance sensor to detect the distance of the coming car/object and a servo motor to open and close the gate with 2 LEDs (green & Red) for go and stop sign as shown in the circuit below. Show your circuit image you made through Tinkercad in the answer sheet.
Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to 5 V , the ground wire is typically black or brown and should be connected to the ground of the Arduino and the signal pin is typically yellow or orange and should be connected to PWM pin on the Arduino.
Add 2 LEDs (green and red) connected to any digital pins.
2.2 Write your code to control the gate detecting a coming car/object using the ultrasonic distance sensor, and open the gate using a servo motor when the car approaches the gate (choose a distance to open the gate on your own) with the green LED on. Otherwise, the gate is closed with the Red LED on.
Use logic statements to automatically open the gate using Servo motor, when the car is near (0 opened) and close the gate when is the car is far (90 closed). Please help me with task 2 its important (tinkerkad circuit and code)
Task 1 : Servo motor control using a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!