Close
0%
0%

Getting the tft to work

Ya know, arduino is supposed to be plug and play. This is a full detail record of getting a tft working.

Similar projects worth following
To connect a china sourced tft for an arduino uno, TO an arduino uno and have it work. THATS IT, REALLY!

I got a touchscreen/tft/sd shield from ebay, and an arduino uno, the idea is to make a datalogger, but I found out that things were in no way cut out for me.

The tft that seemed to be an spf5408 turned out to be a ST7781 or maybe they are the same, I dont know.

  • Brief project history

    Rue Mohr01/01/2015 at 05:52 0 comments

    I got these two thinking it would be plug and play. When I got the screen I started to work to find the software for it. This proved to be an interesting search ont eh grounds that it was indicated to me the controller was a spfd5408, which is not a chip that seems to be commonly supported. I did find a library called UTFT which supports a multitude of chips, but the only example I could get to do anything would wash out and smear the screen with what was supposed to be drawn on it. grr

    .. and that took over 6 hours of work..

    I went back to ebay and messaged the seller, who was happy to help!

    He gave me this link

    http://www.smokeandwires.co.nz/blog/a-2-4-tft-touchscreen-shield-for-arduino/

    so, easy, done, right? wrong. The process requires unpacking the libraries, and then a lot of renaming and moving of folders.

    In the end it worked.

View project log

  • 1
    Step 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...

View all instructions

Enjoy this project?

Share

Discussions

rohanhimansu.1993 wrote 02/28/2017 at 07:38 point

I followed all instructions but mine is still not working :/  

I bount 2.4 tft lcd shield from ebay :

http://www.ebay.de/itm/271882359536

  Are you sure? yes | no

Elliot Matson wrote 01/05/2015 at 01:26 point

Interesting I found this today, I was just using some of those exact shields. I found that mine worked with adafruit's TFTLCD library with no modification necessary.

  Are you sure? yes | no

Rue Mohr wrote 01/06/2015 at 05:02 point

Maybe not quite that quick, there are a few shields out there that LOOK exactly the same, but have screens on them with different controllers, I'm going to try this again to make sure I'm not insane, but I recall that the adafruit libraries did not work with my screen.

  Are you sure? yes | no

DainBramage wrote 01/05/2015 at 00:52 point

+1 Skull for the Vogon poetry.

I'd give you a second skull for getting the TFT to work, if I could.

  Are you sure? yes | no

Rue Mohr wrote 01/06/2015 at 05:03 point

:)

  Are you sure? yes | no

Does this project spark your interest?

Become a member to follow this project and never miss any updates