Junichi Katsu
/
MotorTest2
モータ出力例スイッチ付き ロボット製作セミナー演習
main.cpp
- Committer:
- jksoft
- Date:
- 2013-08-10
- Revision:
- 0:e0b05fdd3b73
File content as of revision 0:e0b05fdd3b73:
#include "mbed.h" #include "TB6612.h" DigitalOut myled(LED1); TB6612 left(p21,p12,p11); TB6612 right(p22,p14,p13); DigitalIn sw(p29); int main() { sw.mode(PullUp); while(sw==1); while(1) { left = 100; right = 100; wait(2.0); left = -100; right = -100; wait(2.0); } }