Giter Site home page Giter Site logo

spfd5408's Introduction

SPFD5408 Library

Author: Joao Lopes
Versions:
	0.9.0 - Beta 1: First public beta - 18/07/15
	0.9.1 - Beta 2: Now works on Mega boards - 19/07/15
	0.9.2 - Beta 3: Now works no Leornardo too - 29/07/15
	*** Discontinued, please see below

This library is the Adafruit TFT Libraries changed to works in TFT 2.4 shields with the SPFD5408 controller. Tested on Arduino Uno, Leonardo and Mega. See it on action in: https://www.youtube.com/watch?v=Q8WvEjXvAws

It is based in the last version of Adafruit, inclusive with buttons features.

The TFT 2.4 is cheap TFT, that generally is from China, without documentation or libraries for it.

When we try to use the TFT 2.4 with SPFD5408 controller in sketches with Adafruit TFT libraries, several things can happen :

- White Screen
- All screen with noise
- Touch not works or is inverted (coordinate Y)
- The colors are inverted
- And other things

After trying for several days trying the solutions I found on the web, and none works 100%. So I decided to do an library specific to this controller.

I changed the Adafruit libraries for TFT: GFX , TFTLCD and TouchScreen. I join all in this one library, the library SPFD5408, to avoid problems with duplicate libraries and enables also have the original library Adafruit ready for use in other projects with another TFT hardware.

ATTENTION: DISCONTINUED

Sorry, this library is discontinued, due now few chinesse TFT is SPFD5402, so few TFT is works with it. I now use the Nextion Display instead this TFT

Tip: I am now using Nextion display (https://nextion.itead.cc/), with many advantages like: 4 wires only for connection with the microcontroller, graphic editor on PC, etc.

DISCLAIMER:

This Library is NOT provided by AdaFruit and they have not endorsed it. This library is just a lot of modifications in the Adafruit Library, to works in TFT with SPFD5408 controller (cheap shields)

ATTENTION:

Due to variations in Chinese shields with some controller, there is no guarantee that will work for everyone.

I test with success in my www.mcufriend.com TFTs, plugged in Uno, Leonardo and Mega Arduino boards.

THIS LIBRARY IS ONLY FOR SPFD5408 controller.

If the white screen persists, can indicate than your TFT is not SPFD5408. Please access this site, to help you identify the controller and library for this TFT:

http://misc.ws/2015/01/24/lcd-touch-screen-information/

INSTALATION:

To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder to SPFD5408.

Place the SPFD5408 library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library.

Or more simple, you access the Arduinos’s IDE menu : sketch/add library

Restart the IDE

If you download any code that uses Adafruit Libraries, please verify it:

—- Pinout XM XP, must be:

#define YP A1  // must be an analog pin, use "An" notation!
#define XM A2  // must be an analog pin, use "An" notation!
#define YM 7   // can be a digital pin
#define XP 6   // can be a digital pin

(please verify it, if only a blank screen or noise is showed or touch doesnt works)

—- readID: comment the original blok:

//  uint16_t identifier = tft.readID();
//
//  if(identifier == 0x9325) {
//    Serial.println(F("Found ILI9325 LCD driver"));
//  } else if(identifier == 0x9328) {
//    Serial.println(F("Found ILI9328 LCD driver"));
//  } else if(identifier == 0x7575) {
//    Serial.println(F("Found HX8347G LCD driver"));
//  } else if(identifier == 0x9341) {
//    Serial.println(F("Found ILI9341 LCD driver"));
//  } else if(identifier == 0x8357) {
//    Serial.println(F("Found HX8357D LCD driver"));
//  } else {
//    Serial.print(F("Unknown LCD driver chip: "));
//    Serial.println(identifier, HEX);
//    Serial.println(F("If using the Adafruit 2.8\" TFT Arduino shield, the line:"));
//    Serial.println(F("  #define USE_ADAFRUIT_SHIELD_PINOUT"));
//    Serial.println(F("should appear in the library header (Adafruit_TFT.h)."));
//    Serial.println(F("If using the breakout board, it should NOT be #defined!"));
//    Serial.println(F("Also if using the breakout, double-check that all wiring"));
//    Serial.println(F("matches the tutorial."));
//    return;
//  }
//
//  tft.begin(identifier);

—- tft.begin: insert after block commented

tft.begin(0x9341); // SDFP5408

<<<<<<< HEAD —- Calibrate before run

—- tft.rotation: Need for Mega (else screen is showed mirrored)

tft.setRotation(0); // Need for the Mega, please changed for your choice of rotation initial

—- Calibrate before run

origin/master

Exists one sketch written for my, to help in calibration of touch
See it in examples folder
Run it and change this parameters:

#define TS_MINX 150
#define TS_MINY 120
#define TS_MAXX 920
#define TS_MAXY 940

(please verify it if the point of touch is not accurate)

————————

All changes in Adafruit code is marked with:

// ### SPFD5408 change -- Begin

(change)

// ### SPFD5408 change -- End

This is useful if You see the points that be workeds for any touble

——————

Examples:

adafruit_originals

	From Adafruit Libraries — Not works with the SPFD5408


spfd5408_calibrate

	Help the calibration of touch (resistive)

spfd5408_tftpaint

	example of Adafruit changed to work with the SPFD5408

spfd5408_graphictest

	example of Adafruit changed to work with the SPFD5408

spfd5408_rotationtest

	example of Adafruit changed to work with the SPFD5408

Acknowledgements:

- First to Adafruit for excellent library
- To Andrologiciels blog (https://andrologiciels.wordpress.com/arduino/lcd/tft-display/)
	As the first library could to show the graphics (before only blank or noise screen)
	and be the basis for any adjustments that I made in this library
- To Berni_ (https://forum.arduino.cc/index.php?topic=223769.15)
	By the logic of TFT calibration for be the basis for my program

spfd5408's People

Contributors

joaolopesf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spfd5408's Issues

Pro mini

Hi,

any idea if this would work on Pro Mini ?

Null pointer while trying to compile

Arduino: 1.8.5 (Mac OS X), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Build options changed, rebuilding all
Archiving built core (caching) in: /var/folders/qg/k59zg13n4y3f7ldwj1j91j9m0000gn/T/arduino_cache_290611/core/core_arduino_avr_mega_cpu_atmega2560_51f02b7210b938436b779d1c032618e1.a
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawLine(int, int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: Disabling relaxation: it will not work with multiple definitions
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawRect(int, int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawFastVLine(int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawFastHLine(int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::fillRect(int, int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::fillScreen(unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::invertDisplay(bool)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawChar(int, int, unsigned char, unsigned int, unsigned int, unsigned char)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::write(unsigned char)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::setRotation(unsigned char)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::contains(int, int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::Adafruit_GFX(int, int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::Adafruit_GFX(int, int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawCircle(int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawCircleHelper(int, int, int, unsigned char, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::fillCircleHelper(int, int, int, unsigned char, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::fillCircle(int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawRoundRect(int, int, int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::fillRoundRect(int, int, int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawTriangle(int, int, int, int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::fillTriangle(int, int, int, int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawBitmap(int, int, unsigned char const*, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawBitmap(int, int, unsigned char const*, int, int, unsigned int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::drawXBitmap(int, int, unsigned char const*, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::setCursor(int, int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::getCursorX() const'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::getCursorY() const'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::setTextSize(unsigned char)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::setTextColor(unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::setTextColor(unsigned int, unsigned int)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::setTextWrap(bool)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::getRotation() const'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::cp437(bool)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::width() const'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX::height() const'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::Adafruit_GFX_Button()'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::Adafruit_GFX_Button()'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::initButton(Adafruit_GFX*, int, int, unsigned char, unsigned char, unsigned int, unsigned int, unsigned int, char*, unsigned char)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::drawButton(bool)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::press(bool)'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::isPressed()'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::justPressed()'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin): In function Adafruit_GFX::drawLine(int, int, int, int, unsigned int)': (.text+0x0): multiple definition of Adafruit_GFX_Button::justReleased()'
sketch/SPFD5408_Adafruit_GFX.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::init()'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::Adafruit_TFTLCD(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::Adafruit_TFTLCD(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::Adafruit_TFTLCD()'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::Adafruit_TFTLCD()'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::reset()'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::setLR()'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::flood(unsigned int, unsigned long)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::pushColors(unsigned int*, unsigned char, bool)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::readID()'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::color565(unsigned char, unsigned char, unsigned char)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::read8fn()'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::readPixel(int, int)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::readReg(unsigned char)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::writeRegister24(unsigned char, unsigned long)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::writeRegister32(unsigned char, unsigned long)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::setAddrWindow(int, int, int, int)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::drawFastHLine(int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::drawFastVLine(int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::fillRect(int, int, int, int, unsigned int)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::fillScreen(unsigned int)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::drawPixel(int, int, unsigned int)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::setRotation(unsigned char)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin): In function Adafruit_TFTLCD::init()': (.text+0x0): multiple definition of Adafruit_TFTLCD::begin(unsigned int)'
sketch/SPFD5408_Adafruit_TFTLCD.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TSPoint::TSPoint()'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TSPoint::TSPoint()'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TSPoint::TSPoint(int, int, int)'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TSPoint::TSPoint(int, int, int)'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TSPoint::operator==(TSPoint)'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TSPoint::operator!=(TSPoint)'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TouchScreen::getPoint()'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TouchScreen::TouchScreen(unsigned char, unsigned char, unsigned char, unsigned char)'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TouchScreen::TouchScreen(unsigned char, unsigned char, unsigned char, unsigned char)'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TouchScreen::TouchScreen(unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TouchScreen::TouchScreen(unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TouchScreen::readTouchX()'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TouchScreen::readTouchY()'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries/SPFD5408/SPFD5408_TouchScreen.cpp.o (symbol from plugin): In function TSPoint::TSPoint()': (.text+0x0): multiple definition of TouchScreen::pressure()'
sketch/SPFD5408_TouchScreen.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
Exception in thread "Thread-37" java.lang.NullPointerException
at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:114)
at cc.arduino.contributions.libraries.LibrariesIndexer.setLibrariesFolders(LibrariesIndexer.java:106)
at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:682)
at processing.app.Base.onBoardOrPortChange(Base.java:1313)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2198)
at java.lang.Thread.run(Thread.java:748)

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

touch inverted along the diagonal

I have referred issues 4 and 6 and mine is somewhat similar. my touch coordinates is inverted along the diagonal which moves from top left to bottom right.

The touch scenarios is as follows in paint:

  1. I click on top left, the point is displayed correctly on the top left.
  2. I click on bottom right, the point is displayed correctly on the bottom right.
  3. I click on top right, the point is displayed on the bottom left.
  4. I click on bottom left, the point is displayed on top right.

It was initially fully inverted, when i uncommented line 159 of SPFD5408_TouchScreen.cpp and commented line 163. Please help me on how to fix this issue.

Mirrored text

First, thanks for the code, and an apology for my bad english.

It work very fine (the touch screen and colors, works fine in Arduino Mega 2560) but i have a problem when im using "tft.setRotation(1);" , the text is mirrored and coordinates of the drawings too, and i can´t fix this.

Can you help me, please?

Possible to turn backlight off?

Hello, Is it possible to turn off the backlight while still being able to wait for touch input anywhere on the screen?

Also, Thank you very much for this library.

Initializing spfd5408 on Arduino Uno R3

Hello, I seem to be having trouble getting my display to work when updating Adafruit GFX and TFTLCD libraries to integrate your code changes but still no go.

Is there a list of binary hex values I can use to manually start the display through individual pin toggling, the boot sequence for the controller?

Thanks

TFT rotation and Touch coordinates

Hi,

When using the paint sample, I can see that screen rotation is not the same that touch rotation : I touch horizontaly (left to right), it draws verticaly (bottom to top).
If I tft.setRotation(1), coords are good.

How can I have touch and screen rotation have matching coords ?

Thanks.

converting to ESP32

Hello, I have some of this TFT LCD running on Arduino Uno with SPF5408. But now I want to convert to ESP32. When compiling, I get:
SPFD5408-master \ pin_magic.h: 374: 3: error: #error "Board type unsupported / not recognized" and other issues.
Is it possible to port the spf5408 for ESP32?

best regards
Dieter Koppetsch

Inverse colors

Hi,

When trying samples my color are inversed (red is cyan, black is white...)

In my app, I have to inverse all color bits to get the right colors :)

Compile fro Arduino Due

I try compile the TFTPaint example for Arduino Due but have the errors.
My Arduino IDE version: 1.8.5
Arduino SAM Boards (32-bits ARM Cortex-M3): 1.6.11
Errors list:
In file included from C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/pins_arduino.h:20:0,

from C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:6:

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp: In member function 'TSPoint TouchScreen::getPoint()':

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:63:65: error: invalid conversion from 'Pio*' to 'uint8_t {aka unsigned char}' [-fpermissive]

#define digitalPinToPort(P) ( g_APinDescription[P].pPort )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:61:21: note: in expansion of macro 'digitalPinToPort'

uint8_t xp_port = digitalPinToPort(_xp);

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:63:65: error: invalid conversion from 'Pio*' to 'uint8_t {aka unsigned char}' [-fpermissive]

#define digitalPinToPort(P) ( g_APinDescription[P].pPort )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:62:21: note: in expansion of macro 'digitalPinToPort'

uint8_t yp_port = digitalPinToPort(_yp);

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:63:65: error: invalid conversion from 'Pio*' to 'uint8_t {aka unsigned char}' [-fpermissive]

#define digitalPinToPort(P) ( g_APinDescription[P].pPort )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:63:21: note: in expansion of macro 'digitalPinToPort'

uint8_t xm_port = digitalPinToPort(_xm);

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:63:65: error: invalid conversion from 'Pio*' to 'uint8_t {aka unsigned char}' [-fpermissive]

#define digitalPinToPort(P) ( g_APinDescription[P].pPort )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:64:21: note: in expansion of macro 'digitalPinToPort'

uint8_t ym_port = digitalPinToPort(_ym);

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:77:4: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(yp_port) &= ~yp_pin;

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:78:4: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(ym_port) &= ~ym_pin;

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:86:4: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(xp_port) |= xp_pin;

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:87:4: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(xm_port) &= ~xm_pin;

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:102:5: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(xp_port) &= ~xp_pin;

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:106:5: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(yp_port) |= yp_pin;

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:125:5: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(xp_port) &= ~xp_pin;

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:129:5: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(ym_port) |= ym_pin;

C:\Users\Nullfati-note\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.11\variants\arduino_due_x/variant.h:66:44: error: base operand of '->' is not a pointer

#define portOutputRegister(port) ( &(port->PIO_ODSR) )

C:\Program Files (x86)\Arduino\libraries\SPFD5408-master\SPFD5408_TouchScreen.cpp:133:5: note: in expansion of macro 'portOutputRegister'

*portOutputRegister(yp_port) &= ~yp_pin;

exit status 1

2 or more duplicated screen

Hi.
I'm sorry for my english.
I tested the examples and they work ok, but there is one problem. For example, in graphic test, I see 2 or 3 screen at the same time. When layout is vertical I see 2, when it's horitzontal I see 3. It happens the same in touchscreen test nd so. Any idea please? Thanks a lot.

ID 0x4040

Hello, Joao. Like you I also tried several libraries and all of them failed on the examples. Your lib at least printed something in the screen (see this output from spfd5408_graphicstest https://www.youtube.com/watch?v=Baw-jCqco-s) So I hope to find a solution here. I found that my controller ID is 0x4040 and not sure how compatible yet. How can I change your Library to make it compatible?

Raspberry Pi Zero

Would I be able to modify this library to work on a Rasperry Pi Zero W?

SD Card problem

With the original example for reading bmp file from SD card, I couldn't properly run it. The file could not be found. I wrote a separate function to read the file (using the original SD card reading example), it worked.

Support for This Model?

[http://www.amazon.com/Touch-Screen-Socket-Arduino-Module/dp/B00UAA2XIC/ref=sr_1_1?ie=UTF8&qid=1457917369&sr=8-1&keywords=arduino+TFT]

I have had no luck finding a compatible library.

Doesn't compile: #include "pin_magic.h" not found.

In SPFD5408_Adafruit_TFTLCD.cpp there is a #include "pin_magic.h" but there isn't such file.
I changed the include to #include "pin_magic_UNO.h" but maybe it's better to add it from the original library.

MODELO COMPATIVEL?

Hi, I bought this 2.8 "TFT shield display (www.mcufriend.com):
https://www.ebay.com/itm/2-8-TFT-LCD-Shield-Touch-Panel-Module-Display-Transfer-PCB-Board-fr-Arduino-coi/322593066705?hash=item4b1c0b8ed1:g: h-QAAOSwEUVZaaIC

I'm trying to get it to work on this MEGA 2560 Arduino board: https://www.ebay.com/itm/MEGA-2560-R3-ATMEGA16U2-ATMEGA2560-16AU-Board-USB-Cable-For-Arduino/272386431938?ssPageName= STRK% 3AMEBIDX% 3AIT & _trksid = p2057872.m2749.l2649

I researched a lot, tried several original and alternative libraries, but only "white screen". I did all the steps you described but it did not work. I don't know what else to do...
Could you give me a way to get this display working on my MEGA?
Thanks in advance for your guidance.
Paulo

Ola João Lopes, comprei esse shield display TFT 2.8" (www.mcufriend.com):
https://www.ebay.com/itm/2-8-TFT-LCD-Shield-Touch-Panel-Module-Display-Transfer-PCB-Board-fr-Arduino-coi/322593066705?hash=item4b1c0b8ed1:g:h-QAAOSwEUVZaaIC
Estou tentando fazê-lo funcionar nessa placa Arduino MEGA 2560: https://www.ebay.com/itm/MEGA-2560-R3-ATMEGA16U2-ATMEGA2560-16AU-Board-USB-Cable-For-Arduino/272386431938?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649
Pesquisei bastante, tentei varias bibliotecas originais e alternativas,mas somente aparece a tela branca. Realizei todos os passos descritos por voce mas não deu certo. Não sei mais o que fazer...
Voce poderia ao menos me indicar um caminho para conseguir fazer funcionar esse display na MEGA?
Desde ja agradeço demais por sua orientação.
Um grande abraço! Paulo

How to move the tft lcd data pin

Good night...
I have a question for your library SPDF5408 Adafruit TFT LCD. How do I change the 8-bit data pin of TFT LCD to pin 22-29 or other digital pin on Arduino Mega 2560, and where I need to change its coding, is it on <SPFD5408_Adafruit_TFTLCD.h> or <SPFD5408_Adafruit_GFX.h>??
In my case, digital pin from 2-13 will be used for GSM Shield ?? Please guide me. Thank you!!!

This is the picture:
img_20170522_005527

Touch Y coordinate is inverted

I'm using your library with a 2.4 TFT touchscreen bought on eBay. All works fine, except the touch functionality - every TSPoint obtained using TouchScreen.getPoint() has inverted the Y-coordinate. It would by nice to have an option to set coordinate system for TouchScreen instance (for example as optional parameter of the TouchScreen constructor).

I temporary fixed it by uncommenting the line #159 in the SPFD5408_TouchScreen.cpp file (return TSPoint(x, y, z);).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.