cansat_B 2019 / Mbed 2 deprecated Motor_TB6612

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "TB6612.h"
00003  
00004 DigitalOut myled(LED1);
00005  
00006 TB6612 left(p25,p17,p16);
00007 TB6612 right(p26,p19,p18);
00008 int main() {
00009     while(1) {
00010         left = 100; //左モーター100%
00011         right = 100;//右モーター100%
00012         wait(1.0);
00013         left = 30;//左30%
00014         right = 30;//右30%
00015         wait(1.0);
00016         printf("OK");
00017     }
00018 }
00019 
00020