Sunday, February 11, 2018

Lab 12: Distance Sensing With Ultrasonic Sensor and Arduino

In this lab we used the ultrasonic sensor in combination with the Arduino to obtain sensor readings from the ultrasonic sensor.  Once connected per the lab instructions, we then opened the serial monitor to observe what the sensor readings were.


You can see the values changing as her hand moves closer and farther away from the ultrasonic sensor.  The sensor is detecting her hand and the distance it is from the sensor, then displaying those sensor readings in the serial monitor.


We then added a motor to the circuit and adjusted the program so that if there was something in front of the ultrasonic sensor less than a predetermined distance, the motor would then be turned on.



You can see that when her hand is placed close to the ultrasonic sensor, the sensor reading then becomes within the predetermined distance and the motor is turned on by the Arduino.  These sensor values can be adjusted to whatever distance you like.


Lab 12 finished!

No comments:

Post a Comment

Lab 17: Using IR Sensors for flame and line detection for the VEX

In this lab, we used everything we learned in the previous labs to complete this final lab challenge.  The challenge was to navigate a maze ...