copia12092018

Dependencies:   mbed

io_definitions.h

Committer:
root@developer-sjc-indigo-compiler.local.mbed.org
Date:
2018-11-16
Revision:
13:4d6114864f2d
Parent:
8:b01d4cb1857f

File content as of revision 13:4d6114864f2d:

//Serial pc(USB_TX, USB_RX);
#if defined(logActive)
//Serial pc(D1, D0, 9600);
Serial pc(D1, D0, 115200);
#endif

InterruptIn WheelSensorPin(D5);  //pin at which the wheel sensor is attached
                                //lettura rotazione ruota
                                //l'interrupt triggera un evento quando un ingresso digitale varia
InterruptIn MotorSensorPin(D4);  //pin connected to motor sensor pin
                                //lettura feedback motore
DigitalIn OnOffPin(D12);  //pin connected to on/off switch
                            //enable
PwmOut MotorPwmPin(PA_1);  //pin connected to motor - this must be a digital PWM pin
                            //controllo pwm velocità motore
DigitalIn PlusPercentPin(D3);  //pin connected to +XX% switch
                            // velocità motore = k * velocità ruota : aumento il k
DigitalIn MinusPercentPin(D6);  //pin connected to -XX% switch
                            // velocità motore = k * velocità ruota : dimiuisco il k

DigitalOut SDmotorInB(PA_7);                   // sd motor half bridge direction selector
                                                //comando del ponte ad H per decidere il verso di rotazione (+VDC -VDC) VEDI VNH3SP30
DigitalOut SDmotorInA(PA_2);                   // SD motor half bridge direction selector
                                                //comando del ponte ad H per decidere il verso di rotazione (-VDC +VDC)
DigitalIn enDiag_A(PA_4);                       // SD motor fault condition input A
                                                // non usato
DigitalIn enDiag_B(PA_3);                       // SD motor fault condition input A
                                                // non usato
AnalogIn SDcurrent(PA_0);                       // SD power current feedback
                                                // non usato
DigitalOut led(LED1);
#if defined(canbusActive)
    CAN can1(D10,D2,100000);           // CAN BUS channel for communication with other slave and master consolle
#endif
CANMessage txMsg;
CANMessage rxMsg;