I ( a real noob ) am trying to make a touchscreen thermostat.
The analog reading from the ESP goes well, example value 205 (is multiplied by 10 for ModBus).
But i can't convert the data to a string.
void update_Room_temp()
{
int16_t x1, y1;
uint16_t w, h;
String curValue = uint8_t(iRoom_temperature);
int str_len = curValue.length() + 1;
char char_array[str_len];
curValue.toCharArray(char_array, str_len);
tft.fillRect(31,175, 30, 21, ILI9341_RED);
tft.setTextColor(ILI9341_WHITE, ILI9341_ULTRA_DARKGREY);
tft.setFont(&FreeSansBold12pt7b);
tft.getTextBounds(char_array, 40, 220, &x1, &y1, &w, &h);
tft.setCursor(64 - w, 190);
tft.print(char_array);
}
String curValue = uint8_t(iRoom_temperature); Here is the problem.
How can i tft.print the iRoom temperature ?