2.8" TFT interface with atmega328

Hi guys I am a newbie to Arduino and I am trying to interface my Arduino Duemilanove Atmega328p DEVELOPMENTAL BOARD with 2.8" TFT touch screen. I am trying to compile the basic code for touch screen "graphicstest" but I am getting the below mentioned error. HELP ME OUT!!!!!!!! :cold_sweat:

from D:\Projects :~\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD/Adafruit_TFTLCD.h:12,

from D:\Projects\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:10:

d:/projects/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected unqualified-id before 'int'

d:/projects/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'

d:/projects/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'

from D:\Projects\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD/Adafruit_TFTLCD.h:12,

from D:\Projects\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:10:

d:/projects/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'

d:/projects/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

d:/projects/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

So either post the code or send a link to it, only then can we see what is causing the errors.

you know,maybe your code is wrong.post your code,so we can find the mistakes where are they.

I have downloaded the code from the link mentioned below.

http://www.ladyada.net/products/tfttouchbreakout/#connection_options

Once you go to the page there is a download option at the end of the page. I downloaded the Touch screen library, TFT LCD library and GFX library. Unzipped them and added them in my libraries folder. I compile them and the errors show up.

Download

Touch screen library
TFT LCD library
GFX library
Breakout board schematic

I downloaded the Touch screen library, TFT LCD library and GFX library. Unzipped them and added them in my libraries folder.

Did you change the folder name to match the name of the .ccp file? You need to.

I compile them and the errors show up.

You don't compile libraries you include them in code you write. What code did you try and include them in? That is what we are missing.

Just tried to compile some example files in those libraries and had no errors.

Yup I have changed the name of the folders. I am trying to work on the examples given in the Adafruit_TFTLCD folder. I have attached the "graphicstest" example snap shot.I cannot copy paste the entire code since it exceeds the number of character limit in the forum. I complied the program and I am getting the errors mentioned below. In the example the libraries have been called. What am I missing????
:~

from D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD/Adafruit_TFTLCD.h:12,

from D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:10:

d:/projects/consultant/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected unqualified-id before 'int'

d:/projects/consultant/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'

d:/projects/consultant/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/stdlib.h:111: error: expected `)' before 'int'

from D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD/Adafruit_TFTLCD.h:12,

from D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:10:

d:/projects/consultant/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'

d:/projects/consultant/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

d:/projects/consultant/touch screen proj/arduino-0018/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected `)' before 'double'

D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp: In member function 'void Adafruit_TFTLCD::init()':

D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:134: error: 'A3' was not declared in this scope

D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:135: error: 'A2' was not declared in this scope

D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:136: error: 'A1' was not declared in this scope

D:\Projects\Consultant\Touch screen Proj\arduino-0018\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:137: error: 'A0' was not declared in this scope

Ah, you are using Arduino IDE version 0.18.
A lot has happened since then, this libary needs the latest arduino IDE or at least version 1.0.3

Yes Mike ur rite....But my board is not getting connected to the PC with the latest version of the Audruino software. I am stuck in between, Can I wriggle out of this mess???

Well it might need new drivers. What exactly is the error message you get?

Hi Mike,
I had bought a custom made arduino duemilanove board hence, it neva used to connect to the latest version of arduino UI (Ver 1.0.3). I have exchanged it for the original version of Arduino Uno board. Nw I am able to compile and dump the code to the board. Nw one prob solved I have a different prob trying to interface the touch screen LCD. I am trying to interface 3.2" TFT touch screen LCD (TFT_320QVT). I need the drivers for this touch screen.

Are there any codes available online for the board?

Have you seen this:-
http://www.circuitidea.com/Article/Using-Arduino-shield-BL-TFT240320PLUS.html

Hi MIke,
I did go through that link you posted. I am trying to display colours on the TFT LCD with code I have uploaded can u tel wher I am going wrong. Nothing displays on the LCD. :~

Code.txt (5.46 KB)

From what I can see you are using pins 0 and 1 and they are used for serial coms.
It is a very oddly written piece of code.
The problem I suspect is that you have not tested it and are trying to just big bang it and getting the result that nothing works.
Try testing each function separately.

Hi Mike,
I took ur suggestion and programmed it step by step up. Eventually, I got it right. Thanks for the support. CHEERS!!!!! :smiley: