Skip to content

Commit

Permalink
Added M32BY8X3 ouptut support for ESP32 with brightness hack
Browse files Browse the repository at this point in the history
  • Loading branch information
marcmerlin committed Jun 21, 2022
1 parent 1bf1817 commit 4378ef1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions neomatrix_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ uint32_t tft_spi_speed;
#define FASTLED_ALLOW_INTERRUPTS 1
// Newer Samguyver ESP32 FastLED has a new I2S implementation that can be
// better (or worse) than then default RMT which only supports 8 channels.
#define FASTLED_ESP32_I2S
// I'm getting brightness issues on LED strips with I2S when outputting to a matrix too
//#define FASTLED_ESP32_I2S

// https://github.com/FastLED/FastLED/blob/master/src/platforms/esp/32/clockless_rmt_esp32.h
// Trying random options to see if they help with my dual output setup on ESP32
#define FASTLED_RMT_MAX_CHANNELS 4
#define FASTLED_ESP32_FLASH_LOCK 1
#pragma message "Please use https://github.com/samguyer/FastLED.git if stock FastLED is unstable with ESP32"
#endif
#include <FastLED.h>
Expand Down Expand Up @@ -306,6 +312,8 @@ uint32_t tft_spi_speed;
#include <FastLED_NeoMatrix.h>
#define FASTLED_NEOMATRIX

#define NUM_LEDS_PER_STRIP 256

uint8_t matrix_brightness = 64;
// Used by LEDMatrix
const uint16_t MATRIX_TILE_WIDTH = 8; // width of EACH NEOPIXEL MATRIX (not total display)
Expand Down Expand Up @@ -1209,7 +1217,9 @@ void matrix_setup(bool initserial=true, int reservemem = 40000) {
#ifdef ESP8266
FastLED.addLeds<WS2811_PORTA,3>(matrixleds, NUMMATRIX/MATRIX_TILE_H).setCorrection(TypicalLEDStrip);
#else
FastLED.addLeds<WS2811_PORTD,3>(matrixleds, NUMMATRIX/MATRIX_TILE_H).setCorrection(TypicalLEDStrip);
FastLED.addLeds<WS2812B,14, GRB>(matrixleds,0*NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(0x333333);
FastLED.addLeds<WS2812B,12, GRB>(matrixleds,1*NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(0x333333);
FastLED.addLeds<WS2812B,15, GRB>(matrixleds,2*NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP).setCorrection(0x333333);
#endif
Serial.print("Neomatrix parallel output, total LEDs: ");
Serial.println(NUMMATRIX);
Expand Down

0 comments on commit 4378ef1

Please sign in to comment.