One Switch and Two Led's
TrickyTwo
Posts: 1
What I would like to know is, How do I program the Propeller Chip, I want to use one switch and two Led's. The switch will input on the Propeller chip, (P1). The Led's will be (P2 and P3). So if you hold the switch down. It will make the two Led's light up (P2 P3). But when you hit the switch on and off at A slow pace, it will make one of the Led's stay on (P2) and the other Led will stay off (P3). If you don't hit the switch both of the Led's, stay off.
________________Switch_____(1111111111111111111)________________________________ (State of power to Led's and switch (Off=0) (On=1)
__State of Led's Led (P2)______(1111111111111111111)
_______________Led (P3)____(1111111111111111111)
______________Switch_____(1010101010101010101)
_State of Led's Led (P2)_____(1111111111111111111)
______________Led (P3)____(0000000000000000000)
______________Switch_____(0000000000000000000)
_State of Led's Led (P2)_____(0000000000000000000)
_____________Led (P3)_____(0000000000000000000)
Thank You
________________Switch_____(1111111111111111111)________________________________ (State of power to Led's and switch (Off=0) (On=1)
__State of Led's Led (P2)______(1111111111111111111)
_______________Led (P3)____(1111111111111111111)
______________Switch_____(1010101010101010101)
_State of Led's Led (P2)_____(1111111111111111111)
______________Led (P3)____(0000000000000000000)
______________Switch_____(0000000000000000000)
_State of Led's Led (P2)_____(0000000000000000000)
_____________Led (P3)_____(0000000000000000000)
Thank You
Comments
From your description, you want to know whether the switch stays off for some time period or stays on for some time period or changes within some time period. How would you do that?