IR Detection of moving objects, BS2
I am working with some infrared LEDs and I couldn't figure out how to make a code for IR detection of only moving objects that cross the range of the LED instead of everything it picks up. Anyone know how to program a code for something like this?

Comments
And even in the multiple sensor approach, that would work by something being in the Zone 1 detector, then the Zone 2 detector, then the Zone 3 detector -- and your code concluding that it's moving.
For an object to move in front of the Boe-Bot, it must cross first the left, and then right IR.(or vice versa)
Try this:
' {$STAMP BS2} '(can't test this so I don't no if it will work) ' {$PBASIC 2.5} counter VAR Word do IF (IN0 = 0) THEN GOSUB sub endif sub: PAUSE 2 IF (IN9 = 0) then FOR counter = 1 TO 30 PULSOUT 12, 650 PULSOUT 13, 850 next endif loopBut I think you should get a PIR sensor, just for 8$, here:
http://www.parallax.com/detail.asp?product_id=555-28027
-AC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·