Shop OBEX P1 Docs P2 Docs Learn Events
I need help with Adjustable Infrared Sensor Switch — Parallax Forums

I need help with Adjustable Infrared Sensor Switch

XavierXavier Posts: 26
edited 2013-05-22 06:34 in Accessories
Hi,

I'm trying to make a routine for the Adjustable Infrared Sensor Switch for Basic Stamp 2sx I know how to connect it but I don't know how to make it work..

http://www.elecrow.com/sensor-c-111/object-dectect-c-111_113/adjustable-infrared-sensor-switch-3-50cm-p-317.html
http://jxdz.en.alibaba.com/product/659847058-210405611/3_50_cm_adjustable_E18_D50NK_infrared_obstacle_avoidance_sensor_proximity_switch_intelligent_car.html

Please if there is someone who could help me, Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-17 07:40
    From the picture on your 2nd link, this looks like a simple on/off switch. You supply power and a pullup resistor just like with a pushbutton switch. When the sensor "sees" an object, the signal line is connected to ground. You could use the same techniques (code) that you'd use for a pushbutton as shown in the "What's a Microcontroller?" tutorial.

    In terms of "how to make it work", there's no other information you've provided. I assume that there's some kind of adjustment on the device to set the trigger range, but you'll have to find more information or experiment.
  • XavierXavier Posts: 26
    edited 2013-05-22 06:34
    Thanks Mike,

    I'd used the same code that it is used for a pushbutton in the "What's a Microcontroller?" tutorial.
    It work.
    :thumb:

    Thanks.
Sign In or Register to comment.