Alex Allen / flash
Committer:
AlexAllen
Date:
Sat Oct 13 11:16:15 2012 +0000
Revision:
0:8f42ebd85c7a
Child:
1:3c829c6b7d39
A collection of functions that flash lights

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AlexAllen 0:8f42ebd85c7a 1 #ifndef FLASHY
AlexAllen 0:8f42ebd85c7a 2
AlexAllen 0:8f42ebd85c7a 3 /* Lights up each LED in turn starting from the left going
AlexAllen 0:8f42ebd85c7a 4 to the right and then back again */
AlexAllen 0:8f42ebd85c7a 5 void lightup();
AlexAllen 0:8f42ebd85c7a 6
AlexAllen 0:8f42ebd85c7a 7 // 5 second timer counting down on LEDs
AlexAllen 0:8f42ebd85c7a 8 void timer();
AlexAllen 0:8f42ebd85c7a 9
AlexAllen 0:8f42ebd85c7a 10 /* flashes all LEDs on and off at once "times" number of time
AlexAllen 0:8f42ebd85c7a 11 with a gap of "gap" seconds between flashes */
AlexAllen 0:8f42ebd85c7a 12 void flash(int times, float gap);
AlexAllen 0:8f42ebd85c7a 13
AlexAllen 0:8f42ebd85c7a 14 // Single flash on led1 for "gap" seconds
AlexAllen 0:8f42ebd85c7a 15 void flash1(float gap);
AlexAllen 0:8f42ebd85c7a 16
AlexAllen 0:8f42ebd85c7a 17 // Single flash on led1 for "gap" seconds
AlexAllen 0:8f42ebd85c7a 18 void flash2(float gap);
AlexAllen 0:8f42ebd85c7a 19
AlexAllen 0:8f42ebd85c7a 20 /* inifite loop indicating something has failed terminally
AlexAllen 0:8f42ebd85c7a 21 and mbed needs reseting. Flashes outer then inner LEDs */
AlexAllen 0:8f42ebd85c7a 22 void errormsg1(float gap);
AlexAllen 0:8f42ebd85c7a 23
AlexAllen 0:8f42ebd85c7a 24 /* inifite loop indicating something has failed terminally
AlexAllen 0:8f42ebd85c7a 25 and mbed needs reseting. Flashes outer then inner LEDs */
AlexAllen 0:8f42ebd85c7a 26 void errormsg2(float gap);
AlexAllen 0:8f42ebd85c7a 27
AlexAllen 0:8f42ebd85c7a 28 // LEDs light up one at a time until all are lit
AlexAllen 0:8f42ebd85c7a 29 void signal(float gap);
AlexAllen 0:8f42ebd85c7a 30
AlexAllen 0:8f42ebd85c7a 31 #define FLASHY 1
AlexAllen 0:8f42ebd85c7a 32 #endif