Adafruit Joystick TFT featherwing


#1

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?


#2

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


#3

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.


#4

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/


#5

@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() {

} 

#6

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.


#7

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.


#8

@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!


#9

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.


#10

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


#11

Thanks @rickkas7! That should help me a lot!