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:
- 0:a11b0f2e51af
- Child:
- 1:f8bee01e9ab4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 01 12:40:51 2016 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+volatile int count = 0;
+DigitalOut myled(PA_5);
+//DigitalOut led1(LED0);
+Ticker timer1;
+
+void blink_ISR(){
+    count++;
+}
+
+int main() {
+    
+    timer1.attach_us(&blink_ISR , 1000);
+    
+    while(1) {
+        if(count == 1000){
+            myled = 1;
+            wait(0.1);
+            myled = 0;
+            count = 0;
+        }
+    }
+}