Skip to content

neopixel LED "glitch" on ESP32-S2 #3835

Closed
@kattni

Description

@kattni

@hierophect I was asked to tag you on this issue. I am not assigning you as I don't want to make assumptions.

This has been seen on both the MagTag and the Metro ESP32-S2. On the MagTag, I was running 6.1.0-beta.2.

The "glitch" is that while an animation or text is displayed on the LEDs, e.g. they are being lit up, intermittently, a portion of the LEDs will flash a different color.

I am able to consistently reproduce it using the code here which requires a MagTag and an LED strip (preferably one of the new JST connector strips) - the strip is plugged into the D10 port on the MagTag, if needed you can check the guide for details. When running this code, the last seven or so LEDs on the strip will flash a different color pretty regularly.

Noe and Pedro were seeing the same issue with the code here on Metro ESP32-S2 connected to a series of NeoPixel strips for this project. If you watch the GIF that is the main one for the guide (upper left corner of every page), you can see a white LED flash when the "a" and "y" in "Holiday" scrolls past. It's often more pronounced than that, involving more LEDs.

I tried to simplify the code down to something to replicate it without a lot of other variables, but did not succeed. The glitch is not present when only using the LEDs. It can't be the LED Animation library or the MagTag library, because neither are present in Noe and Pedro's project. It is unlikely to be network related because the issue happens on the MagTag between fetches, not during.

I was however able to get the LEDs to glitch running very simple code when the board soft-resets, on MagTag, with the LED strip mentioned above. Save the following as code.py:

import board
import neopixel

pixels = neopixel.NeoPixel(board.D10, 30, brightness=0.3, auto_write=False)

pixels.fill((255, 0, 0))

while True:
    pixels.show()

Then modify the file and save it. You should receive a light show. I find manually resetting the board using ctrl+D and ctrl+C doesn't always make it glitch. But the soft reload that comes with writing something to the board does it every time.

I tried to include everything I could think of here, but feel free to ping me if you have any questions.

Metadata

Metadata

Assignees

Labels

bugespressifapplies to multiple Espressif chips

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions