Hello,
I'm building a weather station using some recycled sensors for wind speed and direction as well as a DHT22 for temp/humidity. The hardware is a Uno and a Freetronics LCD.
I have a limited understanding of, but a long association with, C programming and I have what I think is a very basic question.
The temp/humid sensor seems to have a 1/10 deg (& humidity) accuracy so when I read these values I store them in a float. eg. 23.10 deg C. I want to display this on the LCD as 23.1 not 23.10. So to my question... How do I do this?
How do I format the output to my LCD?
float temp = 23.75;
lcd.print(temp, 1);
Works beautifully. Thanks for your reply.