22
PICAXE
PICAXE
Flashing Crossing Lights
–Program 2: modified to flash for 10 seconds and turn
–off for 10
–seconds
–
–
–
–
–
–
–
–
–
–
–
start:
high 1 ‘turn on LED 1
low 2 ‘turn off LED 2
For b0=1 to 20 ‘repeat 20 times
  pause 500 ‘wait ½ second
  toggle 1 ‘switch LED 1
  toggle 2 ‘switch LED 2
next b0 ‘back to loop
low 1 ‘turn LED 1 off
low 2 ‘turn LED 2 off
pause 10000 ‘stay here 10 seconds
goto start: ‘do it again
Modify program from previous slide and send to 08M -  show changed behavior-Note: to do this on the 7404 circuit additional parts would be needed
OK to copy/paste
Note that “b0” is a variable to store count number – SHOW VARIABLES ON SIMULATOR!
SHOW ON SIMULATOR, TOO!!!  Expand to show variables, too!