 
     // if this is first time button is pressed, move the setpoint
     // if both buttons are pressed, toggle system on and off and save to eeprom
-    // TODO: write this as an interrupt?
+    // write this as an interrupt someday?
     if ((stateUp == LOW) && (stateDwn == LOW) && (prevUp != LOW) && (prevDwn != LOW)) {
         if (mode == off) {
             mode = on;

    Args:
        unit (uint8_t): which HVAC function to activate, or off for all off
    Returns:
        none

    wiring notes:
    red wire - 24V hot

const int offset = 50; // 5

// HVAC system parameters
const unsigned long fanDelay = 60000; // ms, 1 minute
const unsigned long cycleOn = 900000; // ms, 15 minutes
const unsigned long cycleOff = 2700000; // ms, 45 minutes


// global variables used in the loops
int centerpoint;
uint8_t mode;

void setup(void) {
    // setup digital pins
    pinMode(buttonUp, INPUT); // is default
    pinMode(buttonDwn, INPUT); // is default
