Hi,
I'm trying to display a short text message ("Ornella bella") on a WS2812B RGBLED 8x32 matrix but - as a newbie as I am - I'm encountering many difficulties.
My setup uses a separate 5V power source for the LED matrix and an ESP32 to run the code. The problem is that, if I use FastLED it seems to work fine and I succeded in controlling the LEDs for some light effects but I was not able to find a simple example to display text with this library.
If, on the contrary, I try to use the Adafruit Neo-Matrix and Adafruit_Neopixel libraries ( that are used in some tutorials on the web to scroll text messages on the RGB LED matrix) my ESP32 is continuously rebooting without any LED working.
I found a discussion on this forum on this matter and the solution was found by the same forumer that had raised the issue
(Adafruit Neomatrix ESP WROOM 32 reboots - #9 by tjones99):
However, I'm already using an updated Arduino IDE version (2.3.2) and also the Adafruit libraries are updated.
This is the code I'm trying to use (adapted from an example shown in a tutorial on the web, just changed the content of the message)
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#define PIN 26 ////ESP32 pin for data
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, PIN,
NEO_MATRIX_TOP + NEO_MATRIX_LEFT +
NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG,
NEO_GRB + NEO_KHZ800);
const uint16_t colors[] = {
matrix.Color(204, 0, 204), matrix.Color(204, 204, 0), matrix.Color(0, 255, 255),
matrix.Color(255, 10, 127), matrix.Color(127, 0, 255), matrix.Color(0, 255, 0),
matrix.Color(255, 99, 255)};
void setup() {
matrix.begin();
matrix.setTextWrap(false);
matrix.setBrightness(40);
matrix.setTextColor(colors[0]);
}
int x = matrix.width();
int pass = 0;
void loop() {
matrix.fillScreen(0); //Turn off all the LEDs
matrix.setCursor(x, 0);
matrix.print(F("Ornella bella"));
if( --x < -110 ) {
x = matrix.width();
if(++pass >= 8) pass = 0;
matrix.setTextColor(colors[pass]);
}
matrix.show();
delay(33);
}
Thanks really for your help