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
Diff: main.cpp
- Revision:
- 2:8b678520a9fb
- Parent:
- 1:dcd96a8ef857
- Child:
- 3:708851531127
--- a/main.cpp Fri Sep 30 20:43:53 2022 +0000
+++ b/main.cpp Fri Sep 30 20:46:33 2022 +0000
@@ -5,6 +5,7 @@
DigitalOut led2(LED2);
DigitalOut led3(LED3);
DigitalOut led4(LED4);
+int i = 0;
void flip2() {
led2 = !led2;
@@ -20,13 +21,12 @@
}
int main() {
- led2 = 1;
flipper.attach(&flip2, 2 ); // the address of the function to be attached (flip) and the interval (2 seconds)
flipper.attach(&flip1, 1);
flipper.attach(&flip3, 4);
flipper.attach(&flip4, 8);
// spin in a main loop. flipper will interrupt it to call flip
while(1) {
- led1 = !led1;
+ i++;
}
}
\ No newline at end of file