Need IR code for Propeller powered boe bot
bomber
Posts: 297
I am building a boe bot controlled by a Propeller and I need some code that uses the same pinouts as the boe bot code below. The pinouts are the same for the boe-bot IR code (page 238 in Robotics with the Boe-Bot).
' Robotics with the Boe-Bot - FastIrRoaming.bs2 ' Higher performance IR object detection assisted navigation ' {$STAMP BS2} ' {$PBASIC 2.5} DEBUG "Program Running!" irDetectLeft VAR Bit ' Variable Declarations irDetectRight VAR Bit pulseLeft VAR Word pulseRight VAR Word FREQOUT 4, 2000, 3000 ' Signal program start/reset. DO ' Main Routine FREQOUT 8, 1, 38500 ' Check IR Detectors irDetectLeft = IN9 FREQOUT 2, 1, 38500 irDetectRight = IN0 ' Decide how to navigate. IF (irDetectLeft = 0) AND (irDetectRight = 0) THEN pulseLeft = 650 pulseRight = 850 ELSEIF (irDetectLeft = 0) THEN pulseLeft = 850 pulseRight = 850 ELSEIF (irDetectRight = 0) THEN pulseLeft = 650 pulseRight = 650 ELSE pulseLeft = 850 pulseRight = 650 ENDIF PULSOUT 13,pulseLeft ' Apply the pulse. PULSOUT 12,pulseRight PAUSE 15 LOOP ' Repeat Main Routine
Comments
and welcome to the propeller-forum
If I see it right you posted basic stamp code. I guess accidently you have chosen the wrong forum.
As you are already here I would like to invite you to take a look at the $25 QuickStart-Propeller-Board
It can do more as 8 basic stamps can do. In speed and in parallel and if you want IR-code for it
look into the Propeller-code OBEX for example this object http://obex.parallax.com/objects/37/
But there are some more
keep the questions coming
best regards
Stefan
Can you please add a verbal description of what the posted basic-code above is doing?
Of course I can read the code and try to conclude. But I guess you have the "page 238 in Robotics with the Boe-Bot). "
handy and can describe what it is doing
keep the questions coming
best regards
Stefan