Hello all,
After a very crushing and frustrating weekend with my new toys I’m turning to the forums for support. I’ve read through as many posts about the SparkFun ESP32 Thing Plus DMX to LED Shield as I could find. I’ve googles as much as one can google, and I’m stumped hard.
I can not for the life of me get anything to happen with the SparkFun ESP32 Thing Plus DMX to LED Shield. I have two SparkFun ESP32 Thing Plus DMX to LED Shield, two LuMini matrixes, and two SparkFun Thing Plus - ESP32-S2 WROOM (which is recommended by SparkFun as the board to use on the website). Using a breadboard I can get my Lumini 8x8 matrices to work just fine with FastLED, but none of the examples sketches from SparkFunDMX have been successful. I’ve legitimately spent 20 hours this past weekend trying to get something to work.
This is the code I’m using for the breadboard, a SparkFun Thing Plus - ESP32-S2 WROOM, and two LuMini Matrixes:
#include <FastLED.h>
// How many leds in your chain? Change the value of NUM_BOARDS depending on your setup
#define NUM_BOARDS 2
#define NUM_LEDS 64 * NUM_BOARDS //64 LED's per board
// 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 CLOCK_PIN SCK
#define DATA_PIN MOSI
CRGB color;
char colorToEdit;
// 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(15);
//Display our current color data
Serial.print("Red Value: ");
Serial.println(color[0]);
Serial.print("Green Value: ");
Serial.println(color[1]);
Serial.print("Blue Value: ");
Serial.println(color[2]);
Serial.println();
}
void loop()
{
if (Serial.available()) //Check to see if we have new Serial data.
{
colorToEdit = Serial.read();
switch (colorToEdit)
{
case 'R':
case 'r':
color[0] = Serial.parseInt();
break;
case 'G':
case 'g':
color[1] = Serial.parseInt();
break;
case 'B':
case 'b':
color[2] = Serial.parseInt();
break;
}
//Display our current color data
Serial.print("Red Value: ");
Serial.println(color[0]);
Serial.print("Green Value: ");
Serial.println(color[1]);
Serial.print("Blue Value: ");
Serial.println(color[2]);
Serial.println();
for (int i = 0; i < NUM_LEDS; i++)
{
matrix[i] = color;
FastLED.show();
delay(10);
}
}
}
That code works 100% of the time, every time. I changed the Clock and Data pins to match the “Poke Home” connections on the “Documents” → “Hookup Guide” for the SparkFun ESP32 DMX to LED Shield,
https://learn.sparkfun.com/tutorials/sp … ncQAvD_BwE
So in theory, if SparkFun documentation is correct, using the same code should still pass the same results, without even using DMX, with the shield attached. I’ve tried with external power supply to the board, I’ve tried without external power supply to the board. No dice. I am reading 5v on the shield where I’d expect 5v to be present.
I can’t get unedited example 1 or 2 of the SparkFunDMX examples to compile, due to errors
“In member function ‘void SparkFunDMX::update()’:”
"error: ‘U2TXD_OUT_IDX’ was not declared in this scope
pinMatrixOutAttach(txPin, U2TXD_OUT_IDX, false, false);"
"note: suggested alternative: ‘U0TXD_OUT_IDX’
pinMatrixOutAttach(txPin, U2TXD_OUT_IDX, false, false);"
" U0TXD_OUT_IDX"
"exit status 1
Compilation error: exit status 1"
Which is why I’m not even trying to use the DMX function currently, because at this point I just want to see code passed through the shield.
Somebody…
Anybody…
If you’re out there…
Please help.
-James