Shop OBEX P1 Docs P2 Docs Learn Events
gp2d12 object detection — Parallax Forums

gp2d12 object detection

eagle4ceseagle4ces Posts: 14
edited 2010-01-20 23:34 in BASIC Stamp
can i use the gp2d12 for object detection not measuring distance, without the adc.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-20 23:34
    Maybe

    The GP2D12 will produce an analog voltage proportional to the distance to the nearest object viewable. The Stamp inputs have a threshold of about 2V so, when the GP2D12 output is greater than 2V, it will appear as a logic high and, when the GP2D12 output is less than 2V, it will appear as a logic low. This threshold is not guaranteed and may vary somewhat. If this works for you, you could dispense with the ADC. It's also possible to use the RCTIME statement to measure voltage. See www.emesystems.com and follow the "app-notes" link for further information.
Sign In or Register to comment.