Skip to content
Arduino source to fetch data from an ultrasonic rangefinder
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Communicate with an ultrasonic rangefinder to assertain the distance of objects from it.



Connect the following Rangefinder connections to the specified Arduino connections:

  • Rangerfinder 5V -> Arduino 5V
  • Rangefinder Echo Pulse Output -> Arduino Digital 2
  • Rangefinder Trigger Pulse Input -> Arduino Digital 3
  • Rangefinder Do Not Connect -> Arduino Ground
  • Rangefinder Ground -> Arduino Ground


The Arduino will continually send individual bytes (integers in the range 0 -> 255) to the serial port representing the distance of the object from the sensor.

Something went wrong with that request. Please try again.