Sparkfun ESP32 Thing plus DMX to LED shield with ESP32-S2 Thing Plus (WRL17743)

I’m following the guide and have adapted the Example3-MovingHead sketch to map to the pin numbers of the ESP32-S2 which are different from the pin numbers on the ESP32 Thing Plus.

Should that work?

I am getting a slew of compile errors starting with:

fastspi.h:157:23: note: '#pragma message: No hardware SPI pins defined.

Here are my modified pin definitions

//Pin Definitions for ESP32 WROOM
#define CLOCK 36 //SCK ESP32-S2 Thing Plus (WRL-17743)
#define DATA0 37 //CIPO ESP32-S2 Thing Plus (WRL-17743)
#define DATA1 35 //COPI ESP32-S2 Thing Plus (WRL-17743)
#define DATA2 11 //GPIO11 ESP32-S2 Thing Plus (WRL-17743)

ESP32-S2 Thing plus Graphical Datasheet

https://cdn.sparkfun.com/assets/d/b/4/3 … g_plus.pdf

ESP32 Thing plus Graphical Datasheet

https://cdn.sparkfun.com/assets/learn_t … lusV20.pdf

The COPI, CIPO, SCK pins are all at the same header location on both boards. Just with different numbers.

Should this work?

There are a few issues to address:

Pin definitions: While you’ve correctly identified the different pin numbers for the ESP32-S2 Thing Plus, the FastLED library expects specific hardware SPI pins. The error message “No hardware SPI pins defined” suggests that the library is not recognizing the pins you’ve defined as valid SPI pins.

ESP32-S2 compatibility: The FastLED library may not be fully compatible with the ESP32-S2 chip, which has a different pin layout and SPI configuration compared to the standard ESP32.

To resolve these issues, try the following:

Use the correct SPI pins for ESP32-S2:

#define CLOCK 36  // SCK
#define DATA 35   // MOSI

In your FastLED setup, use the following configuration:

FastLED.addLeds<WS2812, DATA, GRB>(leds, NUM_LEDS);

This uses the bit-banging method instead of hardware SPI, which should work with any GPIO pin.

If you specifically need to use SPI, you may need to modify the FastLED library to support the ESP32-S2’s SPI configuration. However, this is a more advanced task and may require significant changes to the library.

Ensure you have selected the correct board in the Arduino IDE: Tools > Board > ESP32 Arduino > ESP32S2 Dev Module (or the specific board you’re using).

Make sure you’re using a version of the FastLED library that supports ESP32. You may need to update to the latest version or use a fork that specifically supports ESP32-S2.

If these steps don’t resolve the issue, you may need to consider using a different LED library that has better support for the ESP32-S2, or stick with the standard ESP32 board

Thank you!

I’m attempting to use this with the Lumini 8x8. Here’s my attempt, which failed verification and will not upload.

Attempted with an without the SPI library. I added it for giggles since the errors complained about SPI pins. no change.

#include <SPI.h>

#include <FastLED.h>

// How many leds in your chain? Change the value of NUM_BOARDS depending on your setup
#define NUM_BOARDS 1
#define NUM_LEDS 64

// The LuMini matrices need two data pins connected, these two pins are common on many microcontrollers, but can be changed according to your setup
// #define DATA_PIN 37
#define DATA_PIN 35
#define CLOCK_PIN 36

// Define the array of leds
CRGB matrix[NUM_LEDS];
void setup() {
  Serial.begin(115200);
  Serial.println("resetting");
  LEDS.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR>(matrix, NUM_LEDS);
  LEDS.setBrightness(20);
}
void fadeAll() {
  for (int i = 0; i < NUM_LEDS; i++)
  {
    matrix[i].nscale8(250);
  }
}

void loop() {
  static uint8_t hue = 0;
  //Rotate around the circle
  for (int i = 0; i < NUM_LEDS; i++) {
    // Set the i'th led to the current hue
    matrix[i] = CHSV(hue++, 150, 255); //display the current hue, then increment it.
    // Show the leds
    FastLED.show();
    fadeAll();//Reduce the brightness of all LEDs so our LED's fade off with every frame.
    // Wait a little bit before we loop around and do it again
    delay(12);
  }
}

I went ahead and bought a Sparkfun Thing Plus.

Same error.

I grabbed a new PC and installed Arduino IDE along with the all the libraries, and the board defs via instruction on https://docs.espressif.com/projects/ard … lling.html

Still fails to verify…

For the Thing Plus you could try using the default sketch first https://github.com/sparkfun/SparkFun_Th … GB_LED.ino the changes the onboard LED

Then after that works, ensure you have the latest FastLED library, and for the APA102 LEDs (which the LuMini 8x8 uses), you’re on the right track using both DATA and CLOCK pins. Let’s modify your code slightly:

#include <FastLED.h>

#define NUM_LEDS 64
#define DATA_PIN 35
#define CLOCK_PIN 36

CRGB leds[NUM_LEDS];

void setup() {
  Serial.begin(115200);
  Serial.println("Resetting");
  
  FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);
  FastLED.setBrightness(20);
}

void loop() {
  // Your existing loop code...
}

Make sure you’ve selected the correct board in Arduino IDE:

For ESP32 Thing Plus: Tools > Board > ESP32 Arduino > ESP32 Dev Module

For ESP32-S2 Thing Plus: Tools > Board > ESP32 Arduino > ESP32S2 Dev Module

If you’re still getting SPI-related errors, you can try using the bit-banging method instead:

FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR, DATA_RATE_MHZ(12)>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);

If the errors persist, can you please provide the exact error messages you’re seeing? This will help in diagnosing the problem more accurately.

As a last resort, you might want to consider using a different LED library that’s known to work well with ESP32, such as NeoPixelBus.