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.
Diff: main.cpp
- Revision:
- 10:956e173b7e3f
- Parent:
- 9:32e85f1fcd15
- Child:
- 11:657cdd3a0a5f
--- a/main.cpp Wed Jul 16 09:49:22 2014 +0000
+++ b/main.cpp Sat Dec 15 22:34:26 2018 +0000
@@ -1,5 +1,17 @@
#include "mbed.h"
+DigitalIn btn(PTE25,PullUp);
+DigitalOut led(LED_RED,1);
+
+int main(){
+ while (1){
+ if (!btn){
+ while (!btn){ wait(0.1f);}
+ led = !led;
+ }
+ }
+}
+/*
DigitalOut gpo(D0);
DigitalOut led(LED_RED);
@@ -10,4 +22,5 @@
led = !led; // toggle led
wait(0.2f);
}
-}
\ No newline at end of file
+}
+*/
\ No newline at end of file