Hi all, I'm working on a hot tub web-thermometer and I need your help.
In my project I have 2 ds18b20 and I want to set the color of the font depending on the values of these sensors, is there a possiblility to "embed" a variablevalue into my code (see line 7 in the code)
If I write for instance green after color: ('color:green') it works fine.
String FontColor;
if (sensors.getTempCByIndex(0)< 20.5) {FontColor="blue";}
else {FontColor="green";}
// Prepare the response
String s = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<!DOCTYPE HTML>\r\n<html>\r\nTemp1: ";
s += "<b>\n";
s +="<font style='color:(FontColor)'>";
s += (Temp1);
s += "</font>";
s += "</b>\n";
s += "
\n";
s += "\r\nTemp2: ";
s += (Temp2);
s += "</html>\n";
// Send the response to the client
Best regards Mats