The ultrasonic sensor measures the distance of the nearest object, sending the result to the serial port. It can work from 2 cm to 3 m. It measures the time spent by the signal to reach the object and return to the sensor.
Connections:
- Vcc -> 5 V
- Trig -> pin 13 (digital pin)
- Echo -> pin 12 (digital pin)
- Out ->
- GND -> GND
Comments