MOでLチカします

Dependencies:   mbed

Revision:
4:06501f975281
Child:
5:7a3e5c323cda
diff -r f57d754b1814 -r 06501f975281 MO.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MO.c	Wed Jan 13 14:56:05 2016 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+
+int main() {
+    while(1) {
+        //M
+        myled = 1; // LED is ON
+        wait(0.3); // 300 ms
+        myled = 0; // LED is OFF
+        wait(0.1); // 100 ms
+        myled = 1; 
+        wait(0.3); 
+        myled = 0; 
+        wait(0.1); 
+
+        wait(0.3); 
+        
+        //O
+        myled = 1; 
+        wait(0.3); 
+        myled = 0; 
+        wait(0.1); 
+        myled = 1; 
+        wait(0.3); 
+        myled = 0; 
+        wait(0.1); 
+        myled = 1; 
+        wait(0.3); 
+        myled = 0; 
+        wait(0.1); 
+        
+        wait(0.3);
+    }
+}