Shop OBEX P1 Docs P2 Docs Learn Events
how to wire sharp gp2d12 to the basic stamp and use rctime to get distance — Parallax Forums

how to wire sharp gp2d12 to the basic stamp and use rctime to get distance

vla7vla7 Posts: 79
edited 2008-02-20 23:47 in BASIC Stamp
I want to connect the gp2d12 ir ranger to my boe bot and use rctime as an analog to digital converter since I do not have an adc0831.· Every literature I come across uses the adc0831 or has some other application using rctime.· Can someone please explain the wiring· and code I need?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-02-16 04:55
    Check out the rctime command in the editor help file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • vla7vla7 Posts: 79
    edited 2008-02-16 17:01
    where are the editor help files
  • FranklinFranklin Posts: 4,747
    edited 2008-02-16 21:05
    In the basic stamp editor (the program you use to write and download files to the stamp) under help > contents > pbasic reference > alphabetic listing of commands > rctime

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-02-20 23:47
    Bear in mind that the output of the GP2D12 is non-linear. If you don’t account for that in your code you will get less than desirable results. The example code we have uses the ADC8031 and compensates for the non-linearity using interpolation. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.