Getting started with Adafruit Feather TFT ESP32 S3 – withOUT Python

So, in my plan to start messing with LEDs, I found a ton of videos on YouTube for messing around with LEDs strips. Two main takeaways – one, use ESP32 boards, and use 5V LED strips with the 8212B-controlled LEDs. Also, using Python is DOABLE, but for the down and dirty and FAST, compiled C++ in Arduino mode is the way to go.

So, for my ESP32 board, it’s the Adafruit Feather TFT ESP32 S3. When it’s in stock, it’s $24.95. You get the board, an USBC cable and pins headers for making it a development board (mounting the system to a breadboard).

TFT ESP32 S3 board with inclusions and graphics needed

It has a default program on the board – that shows data in the TFT display and cycles the onboard NeoPixel (an embedded WS8212B controlled LED) and shows the current charge level for the battery changing system built into the board. And, no matter what you load on the system, there’s an easy way to get back to that application – called a Factory Reset on the support site.

Default application on TFT Feather S3

So, in trying to guess how to build all this, I tried and tried and finally asked for help on the forums. I was pointed to a link in the Factory Reset page that was the default sketch.

Now, since I’m interested in FastLED and NightDriver that Dave Plummer is showcasing, I need to learn the setup for all this. Enter Visual Studio and PlatformIO. PlatformIO is an extension in VSCode that sets up projects for the boards. You still need to know the modules and includes, but compiling the base program will help.

The other thing I need to know is the PIN designation on the board for when I start plugging in the LED strips – I’ll need to run a data line for each strip. I found that at the Downloads for the board.

So, I New Project in PlatformIO with the correct board and Arduino platform. I paste the base sketch into the main.cpp, and I see the includes:

The Arduino is default for new projects, so I need to know about the Neopixel, testbed, fonts and ST7789(TFT display). Through trial and error, here’s the modules needed in the platformio.ini:

So, if we need to mess with the onboard Neopixel, we have that. Same for the TFT display – we see the code for each in the sketch.

First, we setup a variable for the board with the TestBed library.
Next, we setup the TFT variable with a call the ST7789 library and the built in PIN aliases from PlatformIO’s libraries for the device.
Then we create a canvas for the display with the GFX library.
The setup, we enable the Neopixel, and set it to white to start. Then we setup the display and font.
The variable “j'” is counter for the color of the NeoPixel.
The loop is run with a ticker at runs every 5 ticks of the j variable. In this loop, the screen is redrawn on canvas – or refreshed.
Then the NeoPixel function Wheel is called. The Wheel function sets the color of the NeoPixel based on a decimal value from 0 to 255 (j, with an automatic increment) to get a color value in the 0xRRGGBB format that sets the color of the pixel.

Now, I can take that code and create my own code for the display and use the TestBed library’s other functions, or add new libraries and functions to call the LED strips.

Leave a Comment