Francesco Pistone
/
Viaro_SpandiConcime_V3_inizio
copia12092018
io_definitions.h@4:1643fea75703, 2018-06-29 (annotated)
- Committer:
- viaromassimo
- Date:
- Fri Jun 29 13:07:46 2018 +0000
- Revision:
- 4:1643fea75703
- Parent:
- 1:59c30e854dfb
- Child:
- 5:72bdc69d610d
V3;; rewritten.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nerit | 0:b0a79a3a9da8 | 1 | //#Serial pc(SERIAL_TX, SERIAL_RX); |
viaromassimo | 1:59c30e854dfb | 2 | Serial pc(D1, D0, 115200); |
nerit | 0:b0a79a3a9da8 | 3 | |
viaromassimo | 1:59c30e854dfb | 4 | InterruptIn WheelSensorPin(D5); //pin at which the wheel sensor is attached |
viaromassimo | 1:59c30e854dfb | 5 | InterruptIn MotorSensorPin(D4); //pin connected to motor sensor pin |
viaromassimo | 1:59c30e854dfb | 6 | DigitalIn OnOffPin(D12); //pin connected to on/off switch |
nerit | 0:b0a79a3a9da8 | 7 | PwmOut MotorPwmPin(PA_1); //pin connected to motor - this must be a digital PWM pin |
viaromassimo | 1:59c30e854dfb | 8 | DigitalIn PlusPercentPin(D3); //pin connected to +XX% switch |
viaromassimo | 1:59c30e854dfb | 9 | DigitalIn MinusPercentPin(D6); //pin connected to -XX% switch |
nerit | 0:b0a79a3a9da8 | 10 | |
nerit | 0:b0a79a3a9da8 | 11 | DigitalOut SDmotorInB(PA_7); // sd motor half bridge direction selector |
nerit | 0:b0a79a3a9da8 | 12 | DigitalOut SDmotorInA(PA_2); // SD motor half bridge direction selector |
nerit | 0:b0a79a3a9da8 | 13 | DigitalIn enDiag_A(PA_4); // SD motor fault condition input A |
nerit | 0:b0a79a3a9da8 | 14 | DigitalIn enDiag_B(PA_3); // SD motor fault condition input A |
nerit | 0:b0a79a3a9da8 | 15 | AnalogIn SDcurrent(PA_0); // SD power current feedback |
nerit | 0:b0a79a3a9da8 | 16 | DigitalOut led(LED1); |
nerit | 0:b0a79a3a9da8 | 17 | #if defined(canbusActive) |
nerit | 0:b0a79a3a9da8 | 18 | CAN can1(D10,D2,100000); // CAN BUS channel for communication with other slave and master consolle |
nerit | 0:b0a79a3a9da8 | 19 | #endif |
nerit | 0:b0a79a3a9da8 | 20 | CANMessage txMsg; |
nerit | 0:b0a79a3a9da8 | 21 | CANMessage rxMsg; |