Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TA7291P by
Revision 1:09d8df047ee2, committed 2018-10-09
- 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); } }