Shop OBEX P1 Docs P2 Docs Learn Events
infrared sensors — Parallax Forums

infrared sensors

adam4adam4 Posts: 10
edited 2006-12-22 15:28 in BASIC Stamp
HELP!!!

i have to get the infrared sensors to work on my boe-bot (it uses basic stamp 2). my partner and i have typed up this program and the boe-bot is just doing these weird things on the debug terminal. if you move your hand back-and-forth in front of it all these weird symbols take the place of the other characters in the terminal. here is the program we typed:


' Robotics with the Boe-Bot - TestLeftIrPair
' Test IR object detection circuts, IR LED connected to P8 and detector
' connected to P9

' {$STAMP BS2}
' {$PBASIC 2.5}

irDetectLeft VAR Bit

DO

FREQOUT 8, 1, 38500
irDetectLeft = IN9

DEBUG HOME, "irDetectLeft = ", BIN1 irDetectLeft

LOOP

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-22 15:28
    Adam,
    ·
    ·· It sounds like you may have forgotten the BIN1 when you typed in the program into the editor…That would be the only thing I can see that would do that…Oh, one more thing…If you don’t put some sort of PAUSE in the loop you could be overflowing the serial buffer.· Try adding a PAUSE 200 in the loop right after the DEBUG command.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.