Write a program to interface an ultrasonic sensor with Arduino UNO and glow a led in the following manner if the object is >100m distance glow 2 led ( Red & Orange) if the object is >150m & <250m distance glow 3 led ( Red Orange Green) ff object is <100m glow only one led ( Green)
Answers
Answered by
0
Answer:Ultrasonic sensor that measures the distance and the LED's bar graph ... Ultrasonic Sensor with LED's bar graph and buzzer */ int tonePin = 4; //Tone - Red ... HIGH); distance = (duration/2) / 29.1; /*if (distance >= 45 || distance <= 0){ ... else if (proximity >= 3 && proximity <= 4){ tone(tonePin, 200000, 200); } else if ...
Explanation:
Similar questions