I'm confused on how to convert the float of celsius to a string so that the tft.drawstring doesn't throw an error. I've searched around quite a bit, and have seen similar examples, but not for the Seeed brand TFT v1 LCD. Below is a snippet of code that I have
//////////////////////////////////////////////////
int rawvoltage= analogRead(outputpin);
float millivolts= (rawvoltage/1024.0) * 5000;
float celsius= millivolts/10;
Serial.print(celsius);
Serial.print(" degrees Celsius, ");
Serial.print((celsius * 9)/5 + 32);
Serial.println(" degrees Fahrenheit");
float temperature = ((celsius * 9)/5 + 32);
Tft.drawString("Temp:",90,300,2,BLUE);
Tft.drawString(temperature,90,130,2,GREEN);
//////////////////////////////////////////////////////////
The error that I get what do that is the following:
_16_Channel_Relay.ino: In function 'void loop()':
_16_Channel_Relay:201: error: no matching function for call to 'TFT::drawString(float&, int, int, int, int)'
C:\Program Files\Arduino\libraries\TFT/TFT.h:172: note: candidates are: void TFT::drawString(char*, unsigned int, unsigned int, unsigned int, unsigned int)