Switch makes 3LEDblink.
'Set the Switch to portb.1 and set LED to portd.1, portd.0 , portd.3
input portb.1
output portd.1
main:
'When Switch is ON,
if portb.1 = 1 then
'portd.1 is off.
low portd.1
else
'otherwise, blink.
high portd.1
pause 500
high portd.0
pause 500
high portd.3
pause 500
low portd.1
pause 500
low portd.0
pause 500
low portd.3
pause 500
endif
goto main
0 Comments:
Post a Comment
<< Home