.ino for PCB+MD13S+Danfoss valve

If max left from PID calculation “pwmDrive” = -255

from code pwmDanffos = (pwmDrive/2)+128;

(-255/2) + 128 = ~ 0 min duty cycle

if max right PID calculation “pwmDrive” = 255

(255/2) + 128 = ~ 255 max PWM duty cycle

If pwmDrive from PID calculation 0 , no stering error PWM 128 , valve close

sorry about my english

1 Like