Skip to content

Conversation

@henmel
Copy link

@henmel henmel commented Feb 10, 2021

Thanks for a great library. I am running into a WDT Reset issue on my ESP8266 when using some of the library Shift functions.
It happens when I use the leds.ShiftUp() or leds.ShiftDown(), but works fine when using the leds.ShiftLeft() or leds.ShiftRight()
Using a provided example, please see below:

#include <FastLED.h>        //https://github.com/FastLED/FastLED
#include <LEDMatrix.h>      //https://github.com/Jorgen-VikingGod/LEDMatrix

// Change the next defines to match your matrix type and size
#define DATA_PIN            2

#define COLOR_ORDER         GRB
#define CHIPSET             WS2812B

// initial matrix layout (to get led strip index by x/y)
#define MATRIX_WIDTH        16
#define MATRIX_HEIGHT       16
#define MATRIX_TYPE         HORIZONTAL_ZIGZAG_MATRIX
#define MATRIX_SIZE         (MATRIX_WIDTH*MATRIX_HEIGHT)
#define NUMPIXELS           MATRIX_SIZE

// create our matrix based on matrix definition
cLEDMatrix<MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_TYPE> leds;

uint8_t hue;
int16_t counter;
void setup()
{
  // initial LEDs
  FastLED.addLeds<CHIPSET, DATA_PIN, COLOR_ORDER>(leds[0], leds.Size()).setCorrection(TypicalSMD5050);
  FastLED.setCorrection(TypicalLEDStrip);
  FastLED.setBrightness(127);
  FastLED.clear(true);
  delay(500);

  hue = 0;
  counter = 0;
}


void loop()
{
  //leds.ShiftLeft();
  leds.ShiftDown();
  leds.DrawPixel(0,0,CHSV(hue, 255, 255));
//  leds.DrawPixel(0,15,CHSV(hue, 255, 255));
//  leds.DrawPixel(15,0,CHSV(hue, 255, 255));
//  leds.DrawPixel(15,15,CHSV(hue, 255, 255));

  hue+=4;
  counter++;
  FastLED.delay(25);

}

I get the following error right after the boot.

16:01:39.557 ->  ets Jan  8 2013,rst cause:4, boot mode:(3,6)
16:01:39.557 -> 
16:01:39.557 -> wdt reset
16:01:39.557 -> load 0x4010f000, len 3584, room 16 
16:01:39.557 -> tail 0
16:01:39.557 -> chksum 0xb0
16:01:39.557 -> csum 0xb0
16:01:39.557 -> v2843a5ac
16:01:39.557 -> ~ld

Thanks again. Your help is greatly appreciated!

marcmerlin and others added 13 commits May 4, 2018 14:30
Show both reverse order matrices and reverse order tiling
Improve documentation to show reversed order
Fix division by 0 on single point draw, add DrawPixel.
Added pointer to SmartMatrix::GFX to run LEDMatrix code on RGB Panels
This is used by SmartMatrix::GFX zero copy and saves considerable
memory on larger arrays when using SmartMatrix.

See
marcmerlin/FastLED_NeoMatrix_SmartMatrix_LEDMatrix_GFX_Demos@e16c373
Added support for using an externally allocated memory array.
height and width can be bigger than 256 (ILI3941 is 320x240).
If the array is bigger than 32K, signed pointers in the 1D array got
negative and crashed the code.
Similarly mXY multiplies 2 uint16_t, so it should be uint32_t.
Support Matrices with more than 32K pixels.
This allows for faster development/debugging.
More info on how to run/debug LEDMatrix code on linux
@AaronLiddiment
Copy link
Owner

I have just verified my original code, none of the variables go out of bounds. But it looks like you are using a modified version of my library and it wouldn't be the first time someone has created problems with their changes.
Sorry but I don't have the time to debug their versions. In my code the function that actually handles the ShiftUp with your Matrix type is "void HZNHSD(void)" which can be found in the LEDMatrix.h header file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants