Shop OBEX P1 Docs P2 Docs Learn Events
Sharp IR Distance Sensor — Parallax Forums

Sharp IR Distance Sensor

Dan TaylorDan Taylor Posts: 207
edited 2010-03-04 05:37 in Accessories
Can someone give me a simple example code for the Sharp IR distance sensor to work with the BASIC Stamp? The IR distance sensor I have is this one: http://www.trossenrobotics.com/sharp-ir-distance-sensor-gp2d120.aspx
Thanks!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dan Taylor

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-02-23 02:47
    First thing I would recommend is going out on the net and finding the datasheet and then linking it to your next post to help those trying to help you find the information they need.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Dan TaylorDan Taylor Posts: 207
    edited 2010-02-23 03:39
    I believe this is the documentation for it: http://www.kronosrobotics.com/DataSheets/GP2D120.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dan Taylor
  • FranklinFranklin Posts: 4,747
    edited 2010-02-24 19:06
    Look into rctime or ge an ADC. The output of the sharp is an analog voltage.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ercoerco Posts: 20,256
    edited 2010-03-04 05:37
    Very useful info on Sharp IR sensors at· http://www.acroname.com/robotics/info/articles/sharp/sharp.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
Sign In or Register to comment.