Pages: [1]   Go Down
Author Topic: problem [ not maching function for call to 'UTFT::UTFT(int,int,int,int) ]  (Read 503 times)
0 Members and 1 Guest are viewing this topic.
jordan
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
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
Faraday Member
**
Karma: 65
Posts: 2929
"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

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 179
Posts: 8070
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

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: