Another IR Dectector issue
I'm getting a constant shift between 0 and 1 until I move my hand up close then I get a constant 0, I'm trying this on a 2p, do I have to change the freqout value from 38500 to something to account for the faster chip?
Code (usual stuff, just using different pins)
' {$STAMP BS2p}
' {$PBASIC 2.5}
irDetectLeft VAR Bit
DO
FREQOUT 9, 1, 38500
irDetectLeft = IN10
DEBUG HOME, "irDetectLeft = ", BIN1 irDetectLeft
PAUSE 100
LOOP
Code (usual stuff, just using different pins)
' {$STAMP BS2p}
' {$PBASIC 2.5}
irDetectLeft VAR Bit
DO
FREQOUT 9, 1, 38500
irDetectLeft = IN10
DEBUG HOME, "irDetectLeft = ", BIN1 irDetectLeft
PAUSE 100
LOOP
Comments
Your value is 10212
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
C-Bob
Every problem·have at least one·nice, simply and·wrong solution.
Post Edited (C-Bob) : 10/12/2009 9:15:11 PM GMT