Arduino code for a smart thermostat project