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.
main.cpp
- Committer:
- smallstone
- Date:
- 2019-12-13
- Revision:
- 4:8b83bf379766
- Parent:
- 3:f99d3703a6d9
File content as of revision 4:8b83bf379766:
#include "mbed.h" #include "TB6612.h" TB6612 motor1(p24,p29,p30); //pwma,AIN1,AIN2,can brake// TB6612 motor2(p23,p28,p27); //pwmb,BIN1,BIN2,can brake// int main() { motor1=0; //初期はスピード0 motor2=0; wait(20); motor1=20; //スピード20% motor2=20; wait(20); motor1=0; //スピードをリセットし、次の準備時間 motor2=0; wait(20); motor1=40; //スピード40% motor2=40; wait(20); motor1=0; //スピードをリセットし、次の準備時間 motor2=0; wait(20); motor1=60; //スピード60% motor2=60; wait(20); motor1=0; //スピードをリセットし、次の準備時間 motor2=0; wait(20); motor1=80; //スピード80% motor2=80; wait(20); motor1=0; //スピードをリセットし、次の準備時間 motor2=0; wait(20); motor1=100; //スピード100% motor2=100; wait(20); motor1=0; //スピードをリセットし、次の準備時間 motor2=0; }