I am trying to get my tft to print simple analog inputs (raw values) 0-1023
I mimic some commands from a code that i have running with my other 16x2 display with <liquidCrystal.h library>
But the <utft.h> library dont seem to work the same way .
is there a different command than from the 16x2lcd <liquidCrystal.h> , when you want a tft display to print the analogRead ?
otherwise all the generic test codes is working properly
// UTFT_ViewFont (C)2012 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a demo of the included fonts.
//
// This demo was made for modules with a screen resolution
// of 320x240 pixels.
//
// This program requires the UTFT library.
//
#include <UTFT.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t SevenSegNumFont[];
// Uncomment the next line for Arduino 2009/Uno
UTFT myGLCD(QD_TFT180B,11,10,9,12,8); // Remember to change the model parameter to suit your 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:
UTFT_WORKING.ino: In function 'void loop()':
UTFT_WORKING.ino:42: warning: deprecated conversion from string constant to 'char*'
UTFT_WORKING:44: error: invalid conversion from 'int' to 'const char*'
UTFT_WORKING:44: error: initializing argument 1 of 'String::String(const char*)'