Francesco Pistone
/
Viaro_SpandiConcime_V3_inizio
copia12092018
io_definitions.h
- Committer:
- francescopistone
- Date:
- 2018-09-12
- Revision:
- 6:3263fc9d7423
- Parent:
- 5:72bdc69d610d
- Child:
- 7:dc3cb1a5764b
File content as of revision 6:3263fc9d7423:
//#Serial pc(SERIAL_TX, SERIAL_RX); #if defined(logActive) Serial pc(D1, D0, 115200); #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 #endif CANMessage txMsg; CANMessage rxMsg;