Main controller code for Arduino temperature controller