An automatic thermostat controller using Mbed