copia12092018

Dependencies:   mbed

Committer:
viaromassimo
Date:
Fri Jun 29 14:05:20 2018 +0000
Revision:
5:72bdc69d610d
Parent:
4:1643fea75703
Child:
6:3263fc9d7423
#define

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nerit 0:b0a79a3a9da8 1 //#Serial pc(SERIAL_TX, SERIAL_RX);
viaromassimo 5:72bdc69d610d 2 #if defined(logActive)
viaromassimo 5:72bdc69d610d 3 Serial pc(D1, D0, 115200);
viaromassimo 5:72bdc69d610d 4 #endif
nerit 0:b0a79a3a9da8 5
viaromassimo 1:59c30e854dfb 6 InterruptIn WheelSensorPin(D5); //pin at which the wheel sensor is attached
viaromassimo 1:59c30e854dfb 7 InterruptIn MotorSensorPin(D4); //pin connected to motor sensor pin
viaromassimo 1:59c30e854dfb 8 DigitalIn OnOffPin(D12); //pin connected to on/off switch
nerit 0:b0a79a3a9da8 9 PwmOut MotorPwmPin(PA_1); //pin connected to motor - this must be a digital PWM pin
viaromassimo 1:59c30e854dfb 10 DigitalIn PlusPercentPin(D3); //pin connected to +XX% switch
viaromassimo 1:59c30e854dfb 11 DigitalIn MinusPercentPin(D6); //pin connected to -XX% switch
nerit 0:b0a79a3a9da8 12
nerit 0:b0a79a3a9da8 13 DigitalOut SDmotorInB(PA_7); // sd motor half bridge direction selector
nerit 0:b0a79a3a9da8 14 DigitalOut SDmotorInA(PA_2); // SD motor half bridge direction selector
nerit 0:b0a79a3a9da8 15 DigitalIn enDiag_A(PA_4); // SD motor fault condition input A
nerit 0:b0a79a3a9da8 16 DigitalIn enDiag_B(PA_3); // SD motor fault condition input A
nerit 0:b0a79a3a9da8 17 AnalogIn SDcurrent(PA_0); // SD power current feedback
nerit 0:b0a79a3a9da8 18 DigitalOut led(LED1);
nerit 0:b0a79a3a9da8 19 #if defined(canbusActive)
nerit 0:b0a79a3a9da8 20 CAN can1(D10,D2,100000); // CAN BUS channel for communication with other slave and master consolle
nerit 0:b0a79a3a9da8 21 #endif
nerit 0:b0a79a3a9da8 22 CANMessage txMsg;
nerit 0:b0a79a3a9da8 23 CANMessage rxMsg;