Loading...
Pages: [1]   Go Down
Author Topic: problem [ not maching function for call to 'UTFT::UTFT(int,int,int,int) ]  (Read 192 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I bought from website [ http://www.sainsmart.com/arduino-compatibles/sainsmart-kit-1/sainsmart-mega2560-board-3-5-tft-lcd-module-display-shield-kit-for-atmel-atmega-avr-16au-atmega8u2.html ]
I I download utft library then moved to folder ((arduino 0023\libraries)) then I wrote Demo code :

#include <UTFT.h>
UTFT    myGLCD(ITDB32S,38,39,40,41);
void setup()
{
  myGLCD.InitLCD(PORTRAIT);
  drawdisplay();
}
void drawDisplay()
{  // Clear screen
myGLCD.clrScr();
// print the lines
myGLCD.setColor(0,255,0);
myGLCD.setBackColor(255,255,255);
MYGLCD.drawRect(0,0,239,319);
myGLCD.drawLine(0,50.5,239,50.5);
myGLCD.drawLine(0,100,239,100);
myGLCD.drawLine(0,130,239,130);
for(int y=1;y<6;y++)
{ myGLCD.drawLine(39.83333333333*y,100,39.83333333333*y,130); }
myGLCD.drawRect(190,50.5,239,76)
myGLCD.drawLine(0,182,319,182);
myGLCD.drawLine(0,208,239,208);
myGLCD.drawLine(0,289,239,289);
myGLCD.drawLine(30,208,30,289);
myGLCD.drawLine(209,208,209,289);
myGLCD.drawLine(119.5,130,119.5,208); // the center
myGLCD.drawCircle(197.3488,70.634,2.8488);}
void loop()
{}



but show error msg [ not maching function for call to 'UTFT::UTFT(int,int,int,int) ]
what's the problem ?
Logged

Queens, New York
Online Online
Edison Member
*
Karma: 29
Posts: 1567
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
myGLCD.drawLine(39.83333333333*y,100,39.83333333333*y,130);
myGLCD.drawLine(119.5,130,119.5,208); // the center
myGLCD.drawCircle(197.3488,70.634,2.8488);
These can not be floats, only ints 39, 119, 197.
Logged

UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino

Arduino Tutorials, coming soon.

"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 96
Posts: 6372
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From the error message it looks like the UTFT constructor is being called with four integers (and failing because there is no constructor that takes four integers).  But in your code the constructor is called with five values (the last four being integers):
Code:
UTFT    myGLCD(ITDB32S,38,39,40,41);

I don't know what is causing that but I would double-check the constructor documentation to make sure you are passing the right arguments in the right order.
Logged

Pages: [1]   Go Up
Print
 
Jump to: