motor_test_IR2302

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
LVRhase01
Date:
Sat Sep 21 15:19:28 2019 +0000
Commit message:
2019/9/22

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 adec39f2bf13 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Sep 21 15:19:28 2019 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+DigitalOut led(LED1);
+PwmOut A(D5);
+PwmOut B(D6);
+
+int main() {
+    while(1) {
+        //ブレーキ
+        A=0;
+        B=0;
+        led=0;
+        wait(3);
+        
+        //正転
+        A=0.9;
+        B=0;
+        led=1;
+        wait(3);
+        
+        //ブレーキ
+        A=0;
+        B=0;
+        led=0;
+        wait(3);
+        
+        //逆転
+        A=0;
+        B=0.9;
+        led=1;
+        wait(3);
+        
+        
+    }
+}
diff -r 000000000000 -r adec39f2bf13 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Sep 21 15:19:28 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file