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-04
- Revision:
- 2:ea39c24e77b2
- Parent:
- 1:293b11fbc576
- Child:
- 3:f99d3703a6d9
File content as of revision 2:ea39c24e77b2:
#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() {
wait(10);
motor1=20;
motor2=20;
wait(10);
motor1=0;
motor2=0;
motor1=40;
motor2=40;
wait(10);
motor1=0;
motor2=0;
motor1=60;
motor2=60;
wait(10);
motor1=0;
motor2=0;
motor1=80;
motor2=80;
wait(10);
motor1=0;
motor2=0;
motor1=80;
motor2=80;
wait(10);
motor1=0;
motor2=0;
motor1=100;
motor2=100;
wait(10);
motor1=0;
motor2=0;
}