right and left move at the same time

Dependencies:   mbed robot

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pin.h Source File

pin.h

00001 #include "mbed.h"
00002 #include "EC.h"
00003 #include "KondoServo.h"
00004 
00005 double resolution=500;
00006 
00007 PwmOut motor_ro_f(p22); //モータ正転
00008 PwmOut motor_ro_b(p21); //モータ逆転
00009 PwmOut motor_ri_f(p24); //モータ正転
00010 PwmOut motor_ri_b(p23); //モータ逆転
00011 
00012 DigitalOut bus_out(p16);
00013 
00014 Ec ec_ro(p8,p7,NC,resolution,0.01);
00015 Ec ec_ri(p11,p6,NC,resolution,0.01);
00016 
00017 CAN can(p9,p10); 
00018 
00019 DigitalIn switch_ro(p12);
00020 DigitalIn switch_ri(p19);
00021 
00022 DigitalOut air1(p20);
00023 DigitalOut air_hand(p17);
00024 
00025 DigitalOut led1(LED1);
00026 DigitalOut led2(LED2);
00027 
00028 KondoServo servo(p13,p14,1,115200);