Ticker_Örneği-1

Dependencies:   mbed

Fork of Timer_HelloWorld by mbed official

Files at this revision

API Documentation at this revision

Comitter:
ctasdemir
Date:
Fri May 11 05:15:59 2018 +0000
Parent:
0:27e1de20d3cb
Commit message:
Ticker_?rne?i

Changed in this revision

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
diff -r 27e1de20d3cb -r a675f50b0b62 main.cpp
--- a/main.cpp	Wed Feb 13 17:28:57 2013 +0000
+++ b/main.cpp	Fri May 11 05:15:59 2018 +0000
@@ -1,10 +1,20 @@
 #include "mbed.h"
+
+void led_task(void);
+
+Ticker timer_ticker;
+DigitalOut led(LED1);
  
-Timer t;
+
  
-int main() {
-    t.start();
-    printf("Hello World!\n");
-    t.stop();
-    printf("The time taken was %f seconds\n", t.read());
+int main(){
+    timer_ticker.attach(&led_task, 0.2);
+    while(1) {
+        wait(1);
+    }
 }
+
+
+void led_task() {
+    led=!led;       
+}
\ No newline at end of file
diff -r 27e1de20d3cb -r a675f50b0b62 mbed.bld
--- a/mbed.bld	Wed Feb 13 17:28:57 2013 +0000
+++ b/mbed.bld	Fri May 11 05:15:59 2018 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/0954ebd79f59
\ No newline at end of file
+https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file