the link above it’s a link to a ready to simulate thermostat project with the source code, and you don’t have necessarily to buy it, you could download it uploading a your project for example. Every way, if you want use the 8051 and implement a thermostat you shouldn’t use a LM35 because it’s an analogic sensor and then you need an ADC to interface it with the microcontroller.As in the project above, it’s better use a digital thermometer and thermostat like the DS1621.