Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of mbed_blinky by
Diff: main.cpp
- Revision:
- 7:11de8dfa1e1d
- Parent:
- 4:81cea7a352b0
- Child:
- 8:746b0ef1b899
--- a/main.cpp Fri May 09 19:58:03 2014 +0300
+++ b/main.cpp Wed May 06 14:48:35 2015 +0000
@@ -1,12 +1,34 @@
#include "mbed.h"
-DigitalOut myled(LED1);
+DigitalOut myled1(P0_17);
+DigitalOut myled2(P0_19);
+DigitalOut myled3(P0_20);
-int main() {
- while(1) {
- myled = 1;
- wait(0.2);
- myled = 0;
- wait(0.2);
+//***************************************************************************
+//***************************************************************************
+int main(void){
+ //blinkTimer.attach( &blinkLed, 2.0 );
+ /*
+ while( true )
+ {
+ sleep();
+ }
+*/
+ for(;;){
+ myled1 = 1; myled2 = 0; myled3 = 0;
+ wait(0.250);
+ myled1 = 0; myled2 = 1; myled3 = 0;
+ wait(0.250);
+ myled1 = 0; myled2 = 0; myled3 = 1;
+ wait(0.250);
+ myled1 = 1; myled2 = 1; myled3 = 0;
+ wait(0.250);
+ myled1 = 1; myled2 = 0; myled3 = 1;
+ wait(0.250);
+ myled1 = 0; myled2 = 1; myled3 = 0;
+ wait(0.250);
+ myled1 = 1; myled2 = 1; myled3 = 1;
+ wait(0.250);
}
}
+
