right and left move at the same time

Dependencies:   mbed robot

pin.h

Committer:
kageyuta
Date:
2019-04-27
Revision:
1:34371ffd3dc0
Parent:
0:411ab20ce87d
Child:
2:db2bc2ae4d20

File content as of revision 1:34371ffd3dc0:

#include "mbed.h"
#include "EC.h"
#include "KondoServo.h"

double resolution=500;

PwmOut motor_ro_f(p22); //モータ正転
PwmOut motor_ro_b(p21); //モータ逆転
PwmOut motor_ri_f(p23); //モータ正転
PwmOut motor_ri_b(p24); //モータ逆転

Ec ec_ro(p8,p7,NC,resolution,0.01);
Ec ec_ri(p11,p6,NC,resolution,0.01);

CAN can(p9,p10); 

DigitalIn switch_ro(p12);
DigitalIn switch_ri(p19);

DigitalOut air1(p20);
DigitalOut air_hand(p17);

DigitalOut led1(LED1);
DigitalOut led2(LED2);

KondoServo servo(p13,p14,1,115200);