I am running a sketch where I am trying to capture and display on the LCD the High and Low temperatures. The following works ok, except the High & Low values have no decimal information. It displays like this:
A:22.9
H:24
L:22
int HighTempA = 0.1;
int LowTempA = 100;
void loop(){
lcd.setCursor(0, 0);
lcd.print("A:");
sensors.requestTemperatures();
lcd.print(sensors.getTempCByIndex(0), 1);
if (HighTempA < sensors.getTempCByIndex(0)) HighTempA = sensors.getTempCByIndex(0);
lcd.setCursor(0, 1);
lcd.print("H:");
lcd.print(HighTempA, 1);
if (LowTempA > sensors.getTempCByIndex(0)) LowTempA = sensors.getTempCByIndex(0);
lcd.setCursor(0, 2);
lcd.print("L:");
lcd.print(LowTempA, 1);
}