Please see all COVID-19 updates here as some shipments may be delayed due to CDC safety and staffing guidelines. If you have an order or shipping question please refer to our Customer Support page. For technical questions please check out our Forums. Thank you for your continued support.



Member Since: December 19, 2011

Country: Belgium

  • Maybe you made a mistake when configuring the sensor? The correct analog ADC reference value needs to be set in hardware and in software.

    The source file, linked below, contains two look-up-tables, one for 5V reference and one for 3.3V reference.


    Using a value from the wrong table results in an wrong measurement. The measured value is approx. thee times too big around the middle of the sensor range. Maybe this lead you to the conclusion that the measurement were expressed in inches?

  • Could you please clarify why you state that my library gives the values in inch instead of centimeters.

    I just checked my code, but everything seems to be ok.

    If you look at the output voltage graph here: http://www.acroname.com/robotics/info/articles/sharp/sharp.html

    and my calculations: http://code.google.com/p/gp2y0a21yk-library/source/browse/#hg%2FCalculations

    they show similar values.

    I live in Belgium and use the metric system, so it would be very strange for me to make this mistake.

  • This library should be helpful when developing applications with this module. (or probably in any L298 H-bridge based design)

    Features: Set the motorspeed, brake, change the motor speed slowly


  • Arduino library for the Sharp GP2Y0A21YK IR Distance sensor: http://code.google.com/p/gp2y0a21yk-library/

No public wish lists :(