File Autosteer_switch-master.zip unzip and open I arduino.
In file “PID.ino”
write on botom file, or copy-paste:
//=========================================
#if (Output_Driver == 4) //PWM 50% if pwmDrive ~ 0 , PWM 0% if pwmDrive -255 …
void motorDrive(void)
{// Used with Danffos valve 50% pwm off valve
pwmDanffos = (pwmDrive/2)+128;
if(pwmDanffos > 195) pwmDanffos = 195; // max 0,75 U , PWM 75%
if (pwmDanffos < 1 ) pwmDanffos = 48; // min 0,25 U ,PWM 25%
analogWrite(PWM1_PIN, pwmDanffos);
}
#endif
//==========================================
In file “Autosteer swetch” on top file write “4” :
#define Output_Driver 4
same file, need add “pwmDanffos = 0 “ :
//pwm variables
int pwmDrive = 0, drive = 0, pwmDisplay = 0 ,pwmDanffos = 0;
float pValue = 0, iValue = 0, dValue = 0;
Need test and PWM duty cycle should have range between 25% to 75%.