モータードライバ確認用

Dependencies:   TA7291P mbed

Committer:
tomoya123
Date:
Fri Mar 17 08:39:40 2017 +0000
Revision:
0:c07686c99919
motor

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tomoya123 0:c07686c99919 1 #include "mbed.h"
tomoya123 0:c07686c99919 2 #include "ta7291p.h"
tomoya123 0:c07686c99919 3
tomoya123 0:c07686c99919 4 ta7291p motor1(p25,p24,p26);
tomoya123 0:c07686c99919 5 ta7291p motor2(p22,p21,p23);
tomoya123 0:c07686c99919 6
tomoya123 0:c07686c99919 7 int main() {
tomoya123 0:c07686c99919 8 while(1) {
tomoya123 0:c07686c99919 9 motor1.rotf(1.0);
tomoya123 0:c07686c99919 10 motor2.rotf(1.0);
tomoya123 0:c07686c99919 11 wait(1.0);
tomoya123 0:c07686c99919 12 motor1.rotstop();
tomoya123 0:c07686c99919 13 motor2.rotstop();
tomoya123 0:c07686c99919 14 wait(2.0);
tomoya123 0:c07686c99919 15 motor1.rotb(1.0);
tomoya123 0:c07686c99919 16 motor2.rotb(1.0);
tomoya123 0:c07686c99919 17 }
tomoya123 0:c07686c99919 18 }