Hi, I am trying to display temperatures with the colour related to the temperature: red=hot, blue=cold. I have this working with another display and the ILI9225 library.
I now want to do teh same with a 1.8" screen and you library. The screen works fine but I am stuck with the "colour code".
For ILI I use:
void drawTempInColour(byte x, byte y,float temp,unsigned int colour)
{
char buf[16];
dtostrf(temp,6,1,buf);
tft.drawText(x, y, buf,colour);
}
which I changed into:
void drawTempInColour(byte x, byte y,float temp,unsigned int colour)
{
char buf[16];
dtostrf(temp,6,1,buf);
ucg.print(x, y, buf,colour);
}
for the UCG libs. I get the following error message from the Arduino IDE:
no matching function for call to 'Ucglib_ST7735_18x128x160_HWSPI::print(byte&, byte&, char [16], unsigned int&)'
I suspect that I need to add something to the line
Hi, I am trying to display temperatures with the colour related to the temperature: red=hot, blue=cold. I have this working with another display and the ILI9225 library. I now want to do teh same with a 1.8" screen and you library. The screen works fine but I am stuck with the "colour code". For ILI I use:
void drawTempInColour(byte x, byte y,float temp,unsigned int colour) { char buf[16]; dtostrf(temp,6,1,buf); tft.drawText(x, y, buf,colour);
}
which I changed into:
void drawTempInColour(byte x, byte y,float temp,unsigned int colour)
{ char buf[16]; dtostrf(temp,6,1,buf); ucg.print(x, y, buf,colour);
}
for the UCG libs. I get the following error message from the Arduino IDE:
no matching function for call to 'Ucglib_ST7735_18x128x160_HWSPI::print(byte&, byte&, char [16], unsigned int&)'
I suspect that I need to add something to the line
Ucglib_ST7735_18x128x160_HWSPI ucg(/cd=/ 9 , /cs=/ 10, /reset=/ 8);
on top of the sketch but do not have the slightest clue what.
Can someone help me out here?
Thank you!
Peter