ArdBir / Open-ArdBir

Arduino Code for Single Vessel Brewing System
GNU General Public License v2.0
67 stars 50 forks source link

PID algorithm #7

Open uncodead opened 5 years ago

uncodead commented 5 years ago

Can you explain why did you multiplique the window size by 250 and divide output by 255? Thank you!

if (now - w_StartTime > (unsigned int) WindowSize 250) { w_StartTime += (unsigned int)WindowSize 250; //time to shift the Relay Window }

if ((Output / 255) ((unsigned int)WindowSize 250) > now - w_StartTime) {