TFT Library Issue

Hey Guys,

Having some issues using the TFT Lib to use a 128x128 TFT screen with my leonardo, i followed the instructions given in the documentation and get thrown this error upon trying to compile

no matching function for call to 'TFT::TFT(int, int, int, int, int)'

This is being thrown while trying to compile the below line


I'm having trouble understanding why, the above is exactly what the documentation instructs you to call.

You're right. That page is completely wrong. In fact it turns out the "TFT library" is just a half-assed wrapper around the Adafruit_ST7735 library. That was a dumb idea on Arduino's part to start with and then they went and did a crap job of it.

My advice is just to drop the TFT library and use the Adafruit_ST7735 library directly:

  • Sketch > Include Library > Manage Libraries
  • Wait for download to finish
  • In the "Filter your search" box, type: Adafruit_ST7735
  • Click on "Adafruit ST7735 Library"
  • Click "Install"
  • In the "Filter your search" box, type: Adafruit_GFX
  • Click on the "Adafruit GFX Library"
  • Click "Install"
  • Click "Close"

After doing that, you'll find some examples under File > Examples > Adafruit ST7735 Library. There is additional documentation here: Adafruit ST7735 Library

I have submitted a pull request to add support for the promised constructor syntax to the TFT library: