智也 大野
/
TA7291P
モータードライバ確認用
Diff: main.cpp
- Revision:
- 0:c07686c99919
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Mar 17 08:39:40 2017 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "ta7291p.h" + +ta7291p motor1(p25,p24,p26); +ta7291p motor2(p22,p21,p23); + +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); + } +}