Francesco Pistone
/
Viaro_SpandiConcime_V3_inizio
copia12092018
Diff: io_definitions.h
- Revision:
- 0:b0a79a3a9da8
- Child:
- 1:59c30e854dfb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/io_definitions.h Wed Jun 13 08:41:23 2018 +0000 @@ -0,0 +1,22 @@ + +//#Serial pc(SERIAL_TX, SERIAL_RX); +//Serial pc(D1, D0, 115200); + +InterruptIn WheelSensorPin(PB_0); //pin at which the wheel sensor is attached +InterruptIn MotorSensorPin(PB_1); //pin connected to motor sensor pin +DigitalIn OnOffPin(PB_4); //pin connected to on/off switch +PwmOut MotorPwmPin(PA_1); //pin connected to motor - this must be a digital PWM pin +DigitalIn PlusPercentPin(PB_5); //pin connected to +XX% switch +DigitalIn MinusPercentPin(PB_6); //pin connected to -XX% switch + +DigitalOut SDmotorInB(PA_7); // sd motor half bridge direction selector +DigitalOut SDmotorInA(PA_2); // SD motor half bridge direction selector +DigitalIn enDiag_A(PA_4); // SD motor fault condition input A +DigitalIn enDiag_B(PA_3); // SD motor fault condition input A +AnalogIn SDcurrent(PA_0); // SD power current feedback +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;