MATSU-bedのLチカ用サンプルプログラム

Dependencies:   mbed MATSUbed USBDevice

Fork of MATSU-bed_blinky by takaaki mastuzawa

Wiki https://developer.mbed.org/teams/MATSU-bed/wiki/MATSU-bed-config

Revision:
2:f94af4a543bd
Parent:
1:68364bcdd696
Child:
3:618130d2d43e
--- a/main.cpp	Thu Apr 14 06:54:49 2016 +0000
+++ b/main.cpp	Wed May 18 13:46:00 2016 +0000
@@ -19,14 +19,17 @@
 int main() {
     //sw1.mode(PullUp);
     
-    myled = 1;
+    myled = 0b0001;
     
     while(1){
         if(myled < 0b1000){
+            wait(0.5);
             myled = myled << 1;
         }else{
-            myled = myled >> 1;    
+            while(myled != 0b0001) {
+                wait(0.5);
+                myled = myled >> 1;
+            }
         }
-        wait(0.5);
     }
-}
\ No newline at end of file
+}