LCDs facinate me very much. The second thing I did with my Arduino and the 16×2 LCD was to hook it up as per this schematic and try to say hi :)
Then I used the same logic to display the temperature.
Things used for this project are
16×2 Hitachi compatible LCD
LM35 Temperature sensor
The LM35 and LCD was wired as shown in the figure.
The major challenge faced during this project was writing the float temperature to LCD. There seems to be some issue with converting float to string in Arduino. After a lot of search I stumbled across dtostrf(). This funciton converts any floating boint number to a string of difined length with defined precision in a predifined buffer which can be printed on the LCD via LiquidCrystal library’s lcd.print().