For this assignment, I used an Ultrasonic Sensor to control a Servo Motor. I first wrote my code on an online simulator (Tinkercad) to control the Ultrasonic sensor, then to control a Servo Motor. I combined the two codes to create the final code. I then mimicked the simulation on Tinkercad and built it on the real Arduino and I copied the code in Arduino.
How do they work?
In an Ultrasonic sensor, one side transmits radio waves, and the other side receives then when they bounce off an object. When the sensor receives the waves, the sensor will read “HIGH”. The longer they take to get back to the sensor the farther the object. If the sensor receives no waves after transmitting them then the sensor will read “LOW” because there are no objects in front of the sensor.
https://wcu.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=7783de12-c927-472f-aba6-afd9000dca55
Recent Comments