Control 2 LEDs with one pin
Hello,
How to control 2 LEDs using one port pin like red and green LED and how to turn off both.
Thank You
How to control 2 LEDs using one port pin like red and green LED and how to turn off both.
Thank You

Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
+5v ---\/\/\---+---\/\/\--- GND | | ----- /\ \/ ----- | | PIN0 LEDcolor VAR OUT0 LEDonoff VAR DIR0 DO LEDonoff = 1 LEDcolor = 1 PAUSE 1000 LEDcolor = 0 PAUSE 1000 LEDonoff = 0 PAUSE 1000 LOOPThe downside? The circuit will draw current even when the LED is not on (a few MA).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Post Edited (Zoot) : 2/17/2008 8:50:20 PM GMT
' {$STAMP BS2} ' {$PBASIC 2.5} DO LOW 8 'Top LED on. PAUSE 1000 FREQOUT 8, 1000, 60 'Both LEDs on. HIGH 8 'Bottom LED on. PAUSE 1000 INPUT 8 'Both LEDs off. PAUSE 1000 LOOP-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php