IR Navigation with Basic Stamp 1 possible
teraflop122
Posts: 8
I've been fiddling with the delightfully inexpensive Stamp 1 Project Boards, trying to figure out a way to drive an IR Led. The BS1 lacks the FREQOUT command, and SOUND is useless for this application (as far as I could tell). Oddly enough, PWM can generate the needed frequency,·in this case·~38.5Khz.
Here is my admittedly simplistic program:
' {$STAMP BS1}
' {$PBASIC 1.0}
SYMBOL· detect· = B2
INPUT 0
Main:
PWM 1, 150, 1
'SOUND 1, (255, 12)
detect = PIN0
DEBUG detect
GOTO Main
The circuit is just the left side of the IR nav circuit in the Boe-Bot manual.·
Anyway,·I figured this might be useful to someone.
EDIT: Come to think of it, the resistor values from the Boe-Bot circuit probably aren't ideal, what with the project boards inline 220 ohm resistors. Even so, the detection range is about 3 inches. What can I say- I'm learning as I go, here.
Post Edited (teraflop122) : 6/10/2008 3:44:22 AM GMT
Here is my admittedly simplistic program:
' {$STAMP BS1}
' {$PBASIC 1.0}
SYMBOL· detect· = B2
INPUT 0
Main:
PWM 1, 150, 1
'SOUND 1, (255, 12)
detect = PIN0
DEBUG detect
GOTO Main
The circuit is just the left side of the IR nav circuit in the Boe-Bot manual.·
Anyway,·I figured this might be useful to someone.
EDIT: Come to think of it, the resistor values from the Boe-Bot circuit probably aren't ideal, what with the project boards inline 220 ohm resistors. Even so, the detection range is about 3 inches. What can I say- I'm learning as I go, here.
Post Edited (teraflop122) : 6/10/2008 3:44:22 AM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
If I built an OEM Basic Stamp 1, could I simply substitute the standard eeprom with a larger one, without modifications to the IDE or firmware?