shota koishi / Mbed 2 deprecated drive2

Dependencies:   mbed

Committer:
smallstone
Date:
Wed Dec 04 13:03:51 2019 +0000
Revision:
2:ea39c24e77b2
Parent:
1:293b11fbc576
Child:
3:f99d3703a6d9
cwdpjc

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 2:ea39c24e77b2 14 motor1=40;
smallstone 2:ea39c24e77b2 15 motor2=40;
smallstone 2:ea39c24e77b2 16 wait(10);
smallstone 2:ea39c24e77b2 17 motor1=0;
smallstone 2:ea39c24e77b2 18 motor2=0;
smallstone 2:ea39c24e77b2 19 motor1=60;
smallstone 2:ea39c24e77b2 20 motor2=60;
smallstone 2:ea39c24e77b2 21 wait(10);
smallstone 2:ea39c24e77b2 22 motor1=0;
smallstone 2:ea39c24e77b2 23 motor2=0;
smallstone 2:ea39c24e77b2 24 motor1=80;
smallstone 2:ea39c24e77b2 25 motor2=80;
smallstone 2:ea39c24e77b2 26 wait(10);
smallstone 2:ea39c24e77b2 27 motor1=0;
smallstone 2:ea39c24e77b2 28 motor2=0;
smallstone 2:ea39c24e77b2 29 motor1=80;
smallstone 2:ea39c24e77b2 30 motor2=80;
smallstone 2:ea39c24e77b2 31 wait(10);
smallstone 2:ea39c24e77b2 32 motor1=0;
smallstone 2:ea39c24e77b2 33 motor2=0;
smallstone 1:293b11fbc576 34 motor1=100;
smallstone 1:293b11fbc576 35 motor2=100;
smallstone 2:ea39c24e77b2 36 wait(10);
smallstone 1:293b11fbc576 37 motor1=0;
smallstone 1:293b11fbc576 38 motor2=0;
smallstone 0:1b294da0842e 39
smallstone 0:1b294da0842e 40 }