'{$STAMP BS2} ' Flasher1.bs2 - a program to Flash 3 LEDs WITHOUT an FSM LED1 CON 0 ' LED 1 is on port 0 LED2 CON 1 ' LED 2 is on port 1 LED3 CON 5 ' LED 3 is on port 5 Control1 VAR BIT ' IF set, causes LED 1 to flash Control2 VAR BIT ' IF set, causes LED 2 to flash Control3 VAR BIT ' IF set, causes LED 3 to flash ' ----------------------------------------------------------- ' Initialization ' ----------------------------------------------------------- Control1 = 1 ' Make it flash Control2 = 1 ' Make it flash Control3 = 1 ' Make it flash ' ----------------------------------------------------------- ' Main Program ' ----------------------------------------------------------- main: IF (Control1 = 0) THEN chk2 ' See if it should be on HIGH LED1 chk2: IF (Control2 = 0) THEN chk3 ' See if it should be on HIGH LED2 chk3: IF (Control3 = 0) THEN wait4it ' See if it should be on HIGH LED3 wait4it: PAUSE 500 ' Wait for 1/2 second LOW LED1 ' turn them all off LOW LED2 LOW LED3 PAUSE 500 ' Wait for 1/2 second GOTO main ' Keep doing it