UTFT help!!! myGLCD.print(sensorValue); error when compiling
i trying tft print simple analog inputs (raw values) 0-1023
i mimic commands code have running with other 16x2 display <liquidcrystal.h library>
but <utft.h> library dont seem work same way .
is there different command 16x2lcd <liquidcrystal.h> , when want tft display to print analogread ?
otherwise generic test codes working properly
error code:
i mimic commands code have running with other 16x2 display <liquidcrystal.h library>
but <utft.h> library dont seem work same way .
is there different command 16x2lcd <liquidcrystal.h> , when want tft display to print analogread ?
otherwise generic test codes working properly
code: [select]
// utft_viewfont (c)2012 henning karlsen
// web: http://www.henningkarlsen.com/electronics
//
// program demo of included fonts.
//
// demo made modules screen resolution
// of 320x240 pixels.
//
// program requires utft library.
//
#include <utft.h>
// declare fonts using
extern uint8_t smallfont[];
extern uint8_t bigfont[];
extern uint8_t sevensegnumfont[];
// uncomment next line arduino 2009/uno
utft myglcd(qd_tft180b,11,10,9,12,8); // remember change model parameter suit display module!
int sensorpin = a0;
int sensorvalue ;
void setup()
{
pinmode(sensorpin , input);
myglcd.initlcd();
myglcd.clrscr();
}
void loop()
{
sensorvalue = analogread(sensorpin);
myglcd.setcolor(255,255,255);
myglcd.setbackcolor(0,0,0);
myglcd.fillscr(0,0,0);
myglcd.setfont(smallfont);
myglcd.print("soil moisture:", left , 3);
myglcd.print(sensorvalue ,right, 3);
while(1) {};
}
error code:
code: [select]
utft_working.ino: in function 'void loop()':
utft_working.ino:42: warning: deprecated conversion string constant 'char*'
utft_working:44: error: invalid conversion 'int' 'const char*'
utft_working:44: error: initializing argument 1 of 'string::string(const char*)'
i suggest have @ difference between print, printnumi , printnumf functions.
the manual can found here http://henningkarlsen.com/electronics/library.php?id=51
cheers
the manual can found here http://henningkarlsen.com/electronics/library.php?id=51
cheers
Arduino Forum > Using Arduino > Displays > UTFT help!!! myGLCD.print(sensorValue); error when compiling
arduino
Comments
Post a Comment