Skip to content

Commit 4378ef1

Browse files
committed
1 parent 1bf1817 commit 4378ef1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

neomatrix_config.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@ uint32_t tft_spi_speed;
142142
#define FASTLED_ALLOW_INTERRUPTS 1
143143
// Newer Samguyver ESP32 FastLED has a new I2S implementation that can be
144144
// better (or worse) than then default RMT which only supports 8 channels.
145-
#define FASTLED_ESP32_I2S
145+
// I'm getting brightness issues on LED strips with I2S when outputting to a matrix too
146+
//#define FASTLED_ESP32_I2S
147+
148+
// https://github.com/FastLED/FastLED/blob/master/src/platforms/esp/32/clockless_rmt_esp32.h
149+
// Trying random options to see if they help with my dual output setup on ESP32
150+
#define FASTLED_RMT_MAX_CHANNELS 4
151+
#define FASTLED_ESP32_FLASH_LOCK 1
146152
#pragma message "Please use https://github.com/samguyer/FastLED.git if stock FastLED is unstable with ESP32"
147153
#endif
148154
#include <FastLED.h>
@@ -306,6 +312,8 @@ uint32_t tft_spi_speed;
306312
#include <FastLED_NeoMatrix.h>
307313
#define FASTLED_NEOMATRIX
308314

315+
#define NUM_LEDS_PER_STRIP 256
316+
309317
uint8_t matrix_brightness = 64;
310318
// Used by LEDMatrix
311319
const uint16_t MATRIX_TILE_WIDTH = 8; // width of EACH NEOPIXEL MATRIX (not total display)
@@ -1209,7 +1217,9 @@ void matrix_setup(bool initserial=true, int reservemem = 40000) {
12091217
#ifdef ESP8266
12101218
FastLED.addLeds<WS2811_PORTA,3>(matrixleds, NUMMATRIX/MATRIX_TILE_H).setCorrection(TypicalLEDStrip);
12111219
#else
1212-
FastLED.addLeds<WS2811_PORTD,3>(matrixleds, NUMMATRIX/MATRIX_TILE_H).setCorrection(TypicalLEDStrip);
1220+
FastLED.addLeds<WS2812B,14, GRB>(matrixleds,0*NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(0x333333);
1221+
FastLED.addLeds<WS2812B,12, GRB>(matrixleds,1*NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(0x333333);
1222+
FastLED.addLeds<WS2812B,15, GRB>(matrixleds,2*NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(0x333333);
12131223
#endif
12141224
Serial.print("Neomatrix parallel output, total LEDs: ");
12151225
Serial.println(NUMMATRIX);

0 commit comments

Comments
 (0)