bs2 candle
Jayguy5000
Posts: 139
I read an article once about a bs2 and some LEDs making the appearance of the LEd's flickering as if it were a candle. where can I find a complete how-to for this project?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Actually I think Im going to add the whiskers to my tank and let it roam, just need to figure out where.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Actually I think Im going to add the whiskers to my tank and let it roam, just need to figure out where.
Comments
You should also look at www.efx-tek.com/topics/wickled.html
HTH, Chris
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I'm not scared of your robot. I'm covered by Old Glory (youtube)
Post Edited (CCraig) : 7/15/2007 4:53:38 AM GMT
Use an LED connected to Pin 0 in series with a 220 ohm resisor (or 470 if you want your battery to last longer). If you need to drive multiple LED's use some NPN transistors and a second voltage supply.
'·{$STAMP BS2}
' {$PBASIC 2.5}
Ramp· VAR Byte
speed VAR Byte
x···· VAR Byte
result VAR Word
DO
RANDOM result
RAMP=RESULT.HIGHBYTE MIN 64
RANDOM result
speed=RESULT.HIGHNIB· MIN 1
FOR x=32 TO ramp STEP speed
· PWM 0,x,5
NEXT
RANDOM result
speed=RESULT.HIGHNIB· MIN 1
FOR x=ramp TO 32 STEP speed
· PWM 0,x,1
NEXT
LOOP
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
Post Edited (TechnoRobbo) : 7/20/2007 1:59:08 AM GMT