隼也 山本 / Mbed 2 deprecated TA7291P_test

Dependencies:   TA7291P mbed

Fork of TA7291P by 智也 大野

Files at this revision

API Documentation at this revision

Comitter:
falconsyunya
Date:
Tue Oct 09 14:03:12 2018 +0000
Parent:
0:c07686c99919
Commit message:
???????TA7291P????????????

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Mar 17 08:39:40 2017 +0000
+++ b/main.cpp	Tue Oct 09 14:03:12 2018 +0000
@@ -1,18 +1,18 @@
 #include "mbed.h"
 #include "ta7291p.h"
 
-ta7291p motor1(p25,p24,p26);
-ta7291p motor2(p22,p21,p23);
+ta7291p motor1(p16,p17,p26);//モーター1の(IN1,IN2,Vref)
+ta7291p motor2(p22,p21,p23);//モーター2の(IN1,IN2,Vref)
 
 int main() {
     while(1) {
-        motor1.rotf(1.0);
-        motor2.rotf(1.0);
-        wait(1.0);
-        motor1.rotstop();
-        motor2.rotstop();
-        wait(2.0);
-        motor1.rotb(1.0);
-        motor2.rotb(1.0);        
+        motor1.rotf(1.0);//モータ1を前回転
+        motor2.rotf(1.0);//モータ2を前回転
+        wait(5.0);
+        motor1.rotstop();//モータ1をストップ
+        motor2.rotstop();//モータ2をストップ
+        motor1.rotb(1.0);//モータ1を後回転
+        motor2.rotb(1.0);//モータ2を後回転 
+        wait(5.0);     
     }
 }