LED flashing

Dependencies:   mbed

Fork of Robotics_LED by No.9 Robotics

Files at this revision

API Documentation at this revision

Comitter:
ChangYuHsuan
Date:
Tue Mar 01 11:10:33 2016 +0000
Parent:
2:5bdcacc40e5a
Commit message:
2016/03/01

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Mar 01 06:05:59 2016 +0000
+++ b/main.cpp	Tue Mar 01 11:10:33 2016 +0000
@@ -37,13 +37,13 @@
     {
         if(timer_1_counter == 1000)
         {
+            // reset timer_1_counter to zero
+            timer_1_counter = 0;
+            
             // led_1 flashes
             led_1 = 1;
-            wait_ms(2);
+            wait(0.2);
             led_1 = 0;
-            
-            // reset timer_1_counter to zero
-            timer_1_counter = 0;
         }
     }
 }
\ No newline at end of file