In order to maintain comfort in the room you need temperature controller. The best results are achieved with heater and cooler working together. Sameer have put quite simple room temperature controller using AT89S52 microcontroller. These microcontrollers are based on industry-standard 80C51 instruction set.
Controller reads temperature from same reliable Ds1820 temperature sensor. While microcontroller doesn’t have internal EEPROM there is an external AT24C02 IC used to store preset values. It is interfaced using I2C communication protocol. Also there is a standard alphanumeric LCD driven in 4-bit mode where temperature and status messages are displayed. Temperature threshold values can be changed using couple push buttons. Unit has two relay switches where one controls heater and another cooler. Depending on current temperature value the relays can be switched differently. For instance is there is too hot in the room, cooler is on and vice versa, if its too cold, then heater is on and cooler is off.