- Sat Feb 27, 2016 7:22 am
#6230
Regards
Mike
cx500tc wrote: Please put code in so that the user can control a cooling fan base on CLT temperatures.The functionality to turn the fan on/off based on coolant temp (i.e. pinCLT input) is already available in the code i implemented Jun of last year. Refer to the auxiliaries code
Code: Select all
To my knowledge there isn't any PWM fan control as yet./*
Fan control
*/
void initialiseFan()
{
if(configPage4.fanInv == 1) {fanHIGH = LOW, fanLOW = HIGH; }
else {fanHIGH = HIGH, fanLOW = LOW;}
digitalWrite(pinFan, fanLOW); //Initiallise program with the fan in the off state
}
void fanControl()
{
if (currentStatus.coolant >= (configPage4.fanSP - CALIBRATION_TEMPERATURE_OFFSET)) { digitalWrite(pinFan,fanHIGH); }
else if (currentStatus.coolant <= (configPage4.fanSP - configPage4.fanHyster)) { digitalWrite(pinFan, fanLOW); }
}
Regards
Mike