Is there some part of the error messages that you don't understand? Serial.print() and UTFT.print() are not interchangeable functions. The serial output doesn't care where to print. The UTFT does.
But im not using serial.print cause at the moment my other sketch prints to serial,
thats just serial.print(humidity,1);
but when i try to add GLCD:print(humidity, 1, center, 70);
Temp_and_humid_LCD_display.ino: In function 'void loop()':
Temp_and_humid_LCD_display:43: error: expected `)' before numeric constant
Temp_and_humid_LCD_display:43: error: no matching function for call to 'UTFT::print(float&, int, int)'
C:\Users\mhsec\Desktop\Arduino-1.0.5\Arduino\libraries\UTFT/UTFT.h:140: note: candidates are: void UTFT::print(char*, int, int, int)
and if i just put
Serial.print(dht.getStatusString());
that in to my UTFT sketch and change it to myGLCD.print(dht.getStatusString());
i recieve
Temp_and_humid_LCD_display.ino: In function 'void loop()':
Temp_and_humid_LCD_display:34: error: no matching function for call to 'UTFT::print(const char*)'
C:\Users\mhsec\Desktop\Arduino-1.0.5\Arduino\libraries\UTFT/UTFT.h:140: note: candidates are: void UTFT::print(char*, int, int, int)
C:\Users\mhsec\Desktop\Arduino-1.0.5\Arduino\libraries\UTFT/UTFT.h:141: note: void UTFT::print(String, int, int, int)
how do i get it so it prints the temperature on my LCD display.
Im guessing i tell it where to print by adding the( , Center, 70)
Sort of. The ", Center, 70" bit does. The () are required for any function call.
The "problem" is that the UTFT class you are using is pretty dumb. It does not know how to print a float. So, you must convert the float to a string first, using dtostrf().
PaulS:
The "problem" is that the UTFT class you are using is pretty dumb. It does not know how to print a float. So, you must convert the float to a string first, using dtostrf().
Another solution would be to try reading the manual (included in the UTFT download) where one can find useful information, like how to print floats with printNumF()...