ローテータを1/0で動かす

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
sayan2
Date:
Fri Feb 28 23:40:11 2020 +0000
Commit message:
a

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 000000000000 -r 6a477e67c6db main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 28 23:40:11 2020 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+DigitalOut FET2(D1);
+DigitalOut FET5(D0);
+DigitalOut FET6(D3);
+int main() {
+    while(1) {
+        myled = 1; 
+        FET2 = 1;
+        wait(10.0); 
+        myled = 0; 
+        FET2 = 0;
+        wait(10.0); 
+        
+        myled = 1; 
+        FET5 = 1;
+        wait(10.0); 
+        myled = 0; 
+        FET5 = 0;
+        wait(10.0); 
+        
+        myled = 1; 
+        FET6 = 1;
+        FET2 = 1;
+        wait(10.0); 
+        myled = 0; 
+        FET2 = 0;
+        wait(10.0); 
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 6a477e67c6db mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Feb 28 23:40:11 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file