Francesco Pistone
/
Viaro_SpandiConcime_V3_inizio
copia12092018
Diff: io_definitions.h
- Revision:
- 6:3263fc9d7423
- Parent:
- 5:72bdc69d610d
- Child:
- 7:dc3cb1a5764b
--- a/io_definitions.h Fri Jun 29 14:05:20 2018 +0000 +++ b/io_definitions.h Wed Sep 12 14:41:23 2018 +0000 @@ -4,17 +4,28 @@ #endif InterruptIn WheelSensorPin(D5); //pin at which the wheel sensor is attached + //lettura rotazione ruota 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