shota koishi / Mbed 2 deprecated drive2

Dependencies:   mbed

Committer:
smallstone
Date:
Wed Dec 04 14:09:14 2019 +0000
Revision:
3:f99d3703a6d9
Parent:
2:ea39c24e77b2
Child:
4:8b83bf379766
cl;dvkw

Who changed what in which revision?

UserRevisionLine numberNew contents of line
smallstone 0:1b294da0842e 1 #include "mbed.h"
smallstone 1:293b11fbc576 2 #include "TB6612.h"
smallstone 0:1b294da0842e 3
smallstone 1:293b11fbc576 4 TB6612 motor1(p24,p29,p30); //pwma,AIN1,AIN2,can brake//
smallstone 1:293b11fbc576 5 TB6612 motor2(p23,p28,p27); //pwmb,BIN1,BIN2,can brake//
smallstone 0:1b294da0842e 6
smallstone 0:1b294da0842e 7 int main() {
smallstone 2:ea39c24e77b2 8 wait(10);
smallstone 2:ea39c24e77b2 9 motor1=20;
smallstone 2:ea39c24e77b2 10 motor2=20;
smallstone 2:ea39c24e77b2 11 wait(10);
smallstone 2:ea39c24e77b2 12 motor1=0;
smallstone 2:ea39c24e77b2 13 motor2=0;
smallstone 3:f99d3703a6d9 14 wait(20);
smallstone 2:ea39c24e77b2 15 motor1=40;
smallstone 2:ea39c24e77b2 16 motor2=40;
smallstone 2:ea39c24e77b2 17 wait(10);
smallstone 2:ea39c24e77b2 18 motor1=0;
smallstone 2:ea39c24e77b2 19 motor2=0;
smallstone 3:f99d3703a6d9 20 wait(20);
smallstone 2:ea39c24e77b2 21 motor1=60;
smallstone 2:ea39c24e77b2 22 motor2=60;
smallstone 2:ea39c24e77b2 23 wait(10);
smallstone 2:ea39c24e77b2 24 motor1=0;
smallstone 2:ea39c24e77b2 25 motor2=0;
smallstone 3:f99d3703a6d9 26 wait(20);
smallstone 2:ea39c24e77b2 27 motor1=80;
smallstone 2:ea39c24e77b2 28 motor2=80;
smallstone 2:ea39c24e77b2 29 wait(10);
smallstone 2:ea39c24e77b2 30 motor1=0;
smallstone 2:ea39c24e77b2 31 motor2=0;
smallstone 2:ea39c24e77b2 32 motor1=80;
smallstone 2:ea39c24e77b2 33 motor2=80;
smallstone 2:ea39c24e77b2 34 wait(10);
smallstone 2:ea39c24e77b2 35 motor1=0;
smallstone 2:ea39c24e77b2 36 motor2=0;
smallstone 3:f99d3703a6d9 37 wait(20);
smallstone 1:293b11fbc576 38 motor1=100;
smallstone 1:293b11fbc576 39 motor2=100;
smallstone 2:ea39c24e77b2 40 wait(10);
smallstone 1:293b11fbc576 41 motor1=0;
smallstone 1:293b11fbc576 42 motor2=0;
smallstone 3:f99d3703a6d9 43 wait(20);
smallstone 0:1b294da0842e 44
smallstone 0:1b294da0842e 45 }