Skip to content

Instantly share code, notes, and snippets.

@niektemme
Created July 31, 2015 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niektemme/bffb5330ad186b19f179 to your computer and use it in GitHub Desktop.
Save niektemme/bffb5330ad186b19f179 to your computer and use it in GitHub Desktop.
Smart Thermostat Arduino - part modified boiler control loop
//main boiler controll loop.
if(runScen == 0) { //no scenario running
if(startup > 0 && vrunl ==2) { //wait for a time delay to make sure there is correctly measured avarage temperature
//if temotemode is true base boiler on/off on message send by raspberry pi
if (remotemode == 1) {
if (rvboiler == 1 ) {
digitalWrite(controllPin, HIGH);
} else {
digitalWrite(controllPin, LOW);
}
//when in local mode check if controll should go to runlevel 1
} else {
runScen = frunScen(avgTemp,sensorValue);
}
} //rest of the control loop remains the same
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment