Neat Lil' things from radioshack
jakjr
Posts: 88
I was at radioshack today and found a few neat things I thought I would share with everyone.
The first was a 10 segment LED bar graph. I hooked it up to my BOE and BS2 using 19 jumper wires and a single 2.2k resitor (2k would have worked as well but I already had some 2.2's laying out). I programed it with this code:
which makes it light up all 10 segments one at a time then turn them off one at a time. Its neat watching the leds growing dimmer while ascending then brighter·while descending.
The second and third things I found was an IR receiver (38khz) and an IR LED, I used the code in this http://www.parallax.com/dl/docs/prod/compshop/tvremote.pdf·text to program them and everything seemed to work great.
By the way, is their anyway to shorten up that code for my 10 segment LED thing?
·
The first was a 10 segment LED bar graph. I hooked it up to my BOE and BS2 using 19 jumper wires and a single 2.2k resitor (2k would have worked as well but I already had some 2.2's laying out). I programed it with this code:
'{$STAMP BS2} '{$PBASIC 2.5}
DO
HIGH 6 PAUSE 1000 HIGH 7 PAUSE 1000 HIGH 8 PAUSE 1000 HIGH 9 PAUSE 1000 HIGH 10 PAUSE 1000 HIGH 11 PAUSE 1000 HIGH 12 PAUSE 1000 HIGH 13 PAUSE 1000 HIGH 14 PAUSE 1000 HIGH 15 PAUSE 1000 LOW 15 PAUSE 1000 LOW 14 PAUSE 1000 LOW 13 PAUSE 1000 LOW 12 PAUSE 1000 LOW 11 PAUSE 1000 LOW 10 PAUSE 1000 LOW 9 PAUSE 1000 LOW 8 PAUSE 1000 LOW 7 PAUSE 1000 LOW 6 PAUSE 1000
LOOP
which makes it light up all 10 segments one at a time then turn them off one at a time. Its neat watching the leds growing dimmer while ascending then brighter·while descending.
The second and third things I found was an IR receiver (38khz) and an IR LED, I used the code in this http://www.parallax.com/dl/docs/prod/compshop/tvremote.pdf·text to program them and everything seemed to work great.
By the way, is their anyway to shorten up that code for my 10 segment LED thing?
·
Comments
Main:
For x= 6 to 15
High x
pause 1000
next
for x=15 to 6
low x
pause 1000
next
GOTO Main
Post Edited (cabojoe) : 8/4/2004 6:40:08 AM GMT
Anyways, I used this code and it worked great, freed up an extra 3% of EEPROM as well.