Adafruit Joystick TFT featherwing

I’m looking to use the following display (https://www.adafruit.com/product/3321) with an argon and tripler.

Has anyone used one of these before? I’ve looked at the adafruit_seesaw library, which has an example for a joystick OLED, but can’t find anything for the TFT.

Can someone point me in a direction that might get me started?

The display setup guide and code is here if that’s what your looking for.

The Adafruit page suggests that the Adafruit_ST7735 library should work and as it happens there seems to be a port of that library available for Particle
https://build.particle.io/libs/Adafruit_ST7735/0.0.1

I have no way of trying it, but it may be worth a shot.

1 Like

I don’t have one of those yet, but I’ll order one.

While that one is not on the page yet, there’s now a list of common feather devices along with which libraries are known to work with mesh devices:

https://docs.particle.io/community/feather/

1 Like

@RWB, @ScruffR, and @rickkas7, Thanks for the direction.

I’ve been giving that a shot, but I’m not having much luck yet.
I use the example in the library, but all I can get so far is a filled white screen.

I’m pretty sure the first two pin definitions are correct, but wasn’t sure about the rst pin.

I’m using the example code:

// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_ST7735.h>

#define cs   D2
#define dc   D3
#define rst  0  

Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, rst); // hardware spi

void setup() {
    
    
	tft.initG();
     
	tft.fillScreen(ST7735_BLACK);

    tft.setCursor(0, 0);
    tft.setTextColor(ST7735_WHITE);
    tft.setTextWrap(true);
    tft.print("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla");     
    
    tft.drawLine(0, 0, tft.width()-1, tft.height()-1, ST7735_YELLOW);
    tft.drawLine(tft.width()-1, 0, 0, tft.height()-1, ST7735_YELLOW);

    tft.drawPixel(0, tft.height()/2, ST7735_GREEN);

}

void loop() {

} 

I’m trying to get this working as well but I am having different issues.

You do need to include the seesaw library and related code since the TFT reset pin is connected to that I2C chip. The “rst” variable in your code should simply be -1. You also need the Adafruit_GFX library.

I am trying to get the newer Adafruit_GFX library and newer Adafruit_ST7735 library working but the Web IDE seems to be terrible when it comes to handling libraries. I need to figure out some other option for compiling firmware for the latest generation devices. The Particle Dev application doesn’t even know what they are.

Particle Workbench is the way to go.
Currently it's a work-in-progress but quite mature since it's based on the well established VS Code.
However, since it's WIP you'll be asked to sign up to the preview and are kindly asked to report any problems you see :wink:

Workbench will allow local and cloud build and you can even build monolithic firmware for debugging.

1 Like

@Kamots, Good luck! I'm currently stalled out.

FYI I have some info going in another related thread:

I had to use (0x5E) as the seesaw address.

Regarding the Adafruit_GFX library, see the comment below from the other thread:

I've begun to work with Particle Workbench and am getting to like it. Adding libraries as you mentioned is a piece of cake, but you do have to get to know a new platform. It's happy with the new generation of devices, and I'm sure as i get to know it better I'll like it even more.

If you get this display running, please share how you did it!

Thanks @ScruffR I’ll give it a try.

@jimbol If I get the screen working I will definitely follow up. Hopefully Workbench will allow me to properly use all the libraries needed.

The AdafruitColorTFTJoystickFeatherWing library makes it easy to use the Adafruit Mini Color TFT with Joystick FeatherWing. Additional information the board is available here.

Pin Function
D2 TFT CS
D3 TFT CD
SCK TFT SCK
MOSI TFT DI

This library basically just pulls in the necessary libraries and provides working examples. It directly depends on:

The ST7735_RK library further depends on:

The examples in the AdafruitColorTFTJoystickFeatherWing show how to read the joystick and buttons, and how to do graphic operations on the color TFT display.

https://docs.particle.io/community/feather/#adafruit-color-tft-joystick-featherwing

2 Likes

Thanks @rickkas7! That should help me a lot!

I have tried everything in my power to get the “AdafruitColorTFTJoystickFeatherWing” code to work I have been commenting on this code from github for a while with no response.

I have been fighting one compilation error after another. At the moment I am at this one…
adafruit_spitft.h:265:32: error: no members matching ‘Adafruit_GFX::drawRGBBitmap’ in ‘class Adafruit_GFX’

I have been slowly working though each one and never get to a functioning compile.

Any help would be appreciated. Thanks

Both examples are compiling correctly for me for boron 1.5.2 with the CLI compiler. The graphics test example built correctly in the Web IDE for argon 2.0.0-rc.3.

It’s hard to say for sure without the full error log, but I’d guess you’re pulling in an older fork of Adafruit-GFX from somewhere instead of Adafruit_GFX_RK.

That library is a meta-library intended to just pull in the dependent libraries so the AdafruitColorTFTJoystickFeatherWing.cpp and .h files are intended to be empty. It builds fine that way.

First try building the two examples. There should be no code changes necessary for it to build so it’s most likely the wrong version of a library being pulled in from somewhere.

According to the properties file everything seems to be the latest files.

The one that wont compile in VS Workbench is this one:
error: no members matching ‘Adafruit_GFX::drawRGBBitmap’ in 'class Adafruit_GFX’
I’m sure it is simple enough to fix it is just beyond my expertise.

I’m running an Argon with the latest firmware loaded. I have tried a tile or two to load via the web compiler but it never worked.


project

Both web compiler examples worked as expected.

Thanks

That combination of libraries is unlikely to ever work. Both Adafruit_GFX_RK and Adafruit_mfGFX implement multi-font GFX. And both Adafruit_ST7735_RK and Adafruit_ST7735 implement the driver for the ST7735. Have two different libraries for the same functions almost never works properly.

2 Likes

They are only there because workbench imported them. Seems like I should remove all but the RK ones.