       // Set state mahcine to idle on the next loop
       stateMachine = s_idle;
       break;
-
-  }
-}
-
-
+  }}
 
 void setup() {
   // Initialize pins

    case s_idle:
      // State is currently: idle. Neather cooling or heating.
      if (checkHeatRequired(dht.readTemperature(), targetHeaterTemperature, targetHeaterTemperatureHyst, false))
      {
        stateMachine = s_HeaterStart;    // Heat required, start.
      }
      else if (checkCoolRequired(dht.readTemperature(), targetCoolerTemperature, targetCoolerTemperatureHyst, false))
      {
        stateMachine = s_CoolerStart;    // Cooling required, start.
      }

      break;

    case s_HeaterStart:

      // This inhibits the cooler turning on.
      // Check if we need to stop, by checking if heat is still required.
      if (!checkHeatRequired(dht.readTemperature(), targetHeaterTemperature, targetHeaterTemperatureHyst, true))
        stateMachine = s_HeaterStop; // Heat no longer required, stop.
      break;

    case s_HeaterStop:
