-
1Step 1
This is done with the arduino 1.0.5 environment. I'm going to assume that your able to connect to your arduino with the environment you have installed, and are abel to prove that with, say, the basic flashing led demo, even if it dosn't result in something flashing on your arduino.
I'm going to ignore the touch screen for this. Every library ever made for a touch screen seems to work. I care about the graphics.
You need two of files mentioned in
http://www.smokeandwires.co.nz/blog/a-2-4-tft-touchscreen-shield-for-arduino/
-- download these --
https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code
and
https://github.com/adafruit/Adafruit-GFX-Library
BECAUSE those are dymanic repository links, and tommorows updates may make todays example not work, I have put a copy of each on my site. (ever notice avr libraries have no versions?)
http://ruemohr.org/~ircjunk/programming/arduino/TFT-Shield-Example-Code-master.zip
http://ruemohr.org/~ircjunk/programming/arduino/Adafruit-GFX-Library-master.zip
Next unpack the two zip files.
They will unzip into two folders, Adafruit-GFX-Library-master and TFT-Shield-Example-Code-master
Rename Adafruit-GFX-Library-master to Adafruit_GFX and put it under the arduino programs library directory. For me this was /files/Installs/Linux/arduino/arduino-1.0.5/libraries
In the TFT-Shield-Example-Code-master directory there is a directory called SWTFT-Shield rename that to SWTFT and place it in the libraries directory.
You should now have two new directories, in my case
zippo:/files/Installs/Linux/arduino/arduino-1.0.5/libraries/SWTFT
zippo:/files/Installs/Linux/arduino/arduino-1.0.5/libraries/Adafruit_GFX
Next you need to cripple the hidden, conflicting, non-compatable Adafruit_GFX. This is done by renaming the libraries directory Robot_Control to Robot-Control.
so where I did have
zippo:/files/Installs/Linux/arduino/arduino-1.0.5/libraries/Robot_Control
I now have
zippo:/files/Installs/Linux/arduino/arduino-1.0.5/libraries/Robot-Control
Next start (or restart) the arduino program. it SHOULD complain that the robot-control library is going to be unavailable because it contains an illegal character in the folder name. (this is what we want) (WHY IS this stuff under robot control anyhow, arn't libraries upposed to build up????)
Now we can make it happen, click file->examples->SWTFT->graphicstest and it should come up with the example sketch. ( if not, as this seems to intermittently fail click file->open->libraries->SWTFT->examples->graphicstest->graphicstest.pde )
Compile, upload and enjoy.
ooops, I did it all in one step, ah per shame...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Hi Rue,
Thanks for the reply. My eyes aren't good enough to read the labels on the controllers. The item appears to be identical to the one at this URL (https://alselectro.wordpress.com/2014/11/28/touch-screen-tft-shield-for-arduino-uno/) I used the code from your site and the original site (and many more). One sketch (Touchscreendemoshield.ino) knows when I am touching the screen but gives almost the same x,y coordinates irrespective of the position of my finger and pressure details vary wildly. I am rapidly coming to the conclusion that the device is faulty. By the way none of the sketches has ever failed to compile and I am using IDE version 1.6.5.
Hope your 2 week absence is an enjoyable holiday.
Best regards
Trevor
Are you sure? yes | no
Right, wonderful, all done but my screen still does nothing. It flickers as the sketch starts then sits there looking smug. Is there any form of contrast control? Or do I have another (second) faulty screen. Is there even a simple check for functionality? My touch screen program (from adafruit) gives an occasional reading, my sketch "ttfbmp" detects the presence or absence of an sd card, and seems to read BMP files but nothing appears on screen all this boils down to the possibility of me not being able to see the screen output, hence the question of contrast or brightness. Any info would be appreciated. BTW - my small OLED screen works fine using the Adafruit libraries.
Are you sure? yes | no
hmmI got a lot of this, I'm away from my shop for antoher 2 weeks, but please tell me more about the screen you have? there are a number of thme that *look* the same, but use different controllers
Did you use the code from my site or the origional site?
I did find that the contrast wasn't awesome. but if its mauling the contrast completely and only showing corrupted data, your close.
Are you sure? yes | no
sorry, had fun finding your comment :). I have not followed the library, when I got it to work, I downloaded a copy as I find thats the only way to make sure you have a 'copy that works'. Are you sure you put the library in the right place, if there is an extra folder then the arduino software dosn't seem to be able to find it.
That all said, did you get it to work yet?
I could find the machine that I did this on and post information on the folder tree if it helps.
Are you sure? yes | no
Hello,
what's the latest update to this library.
I downloaded it and uncommented the lines of data and control pins
Also Adafruit_GFX is not highlighted in orange as this clears that the include file is working.
Even with trick robot-control.
Are you sure? yes | no