Arduino library for Sharp distance sensors

Posted by Ryan on 6 April 2017

Julien de la Bruère-Terreault (also known as DrGFreeman on the Pololu Forum, creator of the Custom Mini Sumo robot and the Romi and Raspberry Pi robot shared on this blog) made “SharpDistSensor” an Arduino library for analog Sharp distance sensors. If you’re running a recent version of the Arduino IDE, you can install it with the Library Manager. The library reads the sensor’s analog voltage output, filters the data, and converts it to a distance measurement. By default it is calibrated to work with the Sharp GP2Y0A60SZLF analog distance sensor 10-150cm 5V, but you can calibrate it to other analog Sharp distance sensors (if you can fit a power function or a fifth order polynomial to the voltage vs distance response of your sensor). Pull requests are welcome for supporting other Sharp distance sensor models!

The readme, library code, and example sketches are available in the GitHub repository.

0 comments

Post a comment

Using your Pololu account allows you to customize your avatar and manage your comments; you can also post anonymously.

Related Products

Pololu Carrier with Sharp/Socle GP2Y0A60SZLF Analog Distance Sensor 10-150cm, 5V
Pololu Carrier with Sharp/Socle GP2Y0A60SZLF Analog Distance Sensor 10-150cm, 3V
Sharp/Socle GP2Y0A02YK0F Analog Distance Sensor 20-150cm
Sharp/Socle GP2Y0A21YK0F Analog Distance Sensor 10-80cm
Sharp/Socle GP2Y0A41SK0F Analog Distance Sensor 4-30cm
Sharp/Socle GP2Y0A51SK0F Analog Distance Sensor 2-15cm
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors