A small program demonstrating use of the Flasher class

Dependencies:   mbed Flasher

Files at this revision

API Documentation at this revision

Comitter:
p07gbar
Date:
Sat Feb 19 14:37:29 2011 +0000
Commit message:
V1.0

Changed in this revision

Flasher.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Flasher.lib	Sat Feb 19 14:37:29 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/p07gbar/code/Flasher/#5c6eb2d20a5a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Feb 19 14:37:29 2011 +0000
@@ -0,0 +1,24 @@
+ // Switches LED1 through the different modes
+ #include "mbed.h"
+ #include "Flasher.h"
+ 
+ Flasher myFlasher(LED1, OFF); //Defines myFlasher on LED1 starting off
+ 
+ int main() {
+      while(1){   
+          wait(5);
+          myFlasher.updateFlash(ON);
+          wait(5);
+          myFlasher.updateFlash(SLOW);
+          wait(5);
+          myFlasher.updateFlash(MEDIUM);
+          wait(5);
+          myFlasher.updateFlash(QUICK);
+          wait(5);
+          myFlasher.onFor(3,ON,MEDIUM);
+          wait(5);
+          myFlasher.pauseFor(2);
+          wait(5);
+          myFlasher.updateFlash(OFF);
+      }
+  }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Feb 19 14:37:29 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912