Shop OBEX P1 Docs P2 Docs Learn Events
Question on interfacing GP2D12 with the BASIC Stamp 1 Project Board — Parallax Forums

Question on interfacing GP2D12 with the BASIC Stamp 1 Project Board

haunteddansionhaunteddansion Posts: 68
edited 2005-11-08 05:52 in BASIC Stamp
Hi there, I am an industrial design college student and am trying to use the sharp GP2D12 IR sensors to give me an analog responce through my serial port in ascii format so I can use some software I am working on to read the ascii and use it to control a function on the computer. So basically I need to know if I can use the BASIC Stamp 1 Project Board, and what would the code look like to give my pc ascii code from the sharp GP2D12 IR sensors. Thanks for all the help for I am new to this and any diagrams and such will help.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-08 00:29
    Hello,

    ·· You would need an Analog To Digital Converter (ADC).· As for the values, remember that this sensor is non-linear in it's output, and so will be your data.· On the other hand, if you use the BASIC Stamp 2, we have a ready-made program to read this, and all you would need would be the ADC0831 chip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • haunteddansionhaunteddansion Posts: 68
    edited 2005-11-08 01:34
    I am really new at this, can you simplify for me.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-08 05:52
    Well, on the BASIC Stamp 2 you could simply use this article to get started:

    http://www.parallax.com/dl/docs/cols/nv/vol5/col/nv114.pdf

    As for a BS1 example, we don't currently have one available.· You'd simply have to work through it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.