Wednesday, September 15, 2010

PicAXE - Video how-to for Halloween Props: Part 2

Wanted to get this up without delay:



It's starting with the setup from the last video. Added another LED and a microswitch input.


Again, let me know what you think or if there is further detail needed. I'm working on coming up with some more examples, but if you have something in mind let me know.

Here is the code snippet for this 2nd example:

symbol counter = b1
symbol LED1 = 0
symbol LED2 = 1

main:

high LED1
high LED2
if pin4 = 1 then dance
goto main


dance:
for counter = 1 to 10
high LED1
pause 200
low LED1
high LED2
pause 200
low LED2
pause 200
next counter
high LED1
high LED2
wait 10
goto main

No comments:

Post a Comment