ambiot / ambd_arduino

AmebaD Arduino third-party package SDK
MIT License
82 stars 52 forks source link

WS2812B fails with multiple calls to show() #241

Closed lewispg228 closed 3 weeks ago

lewispg228 commented 1 month ago

Boards

SparkFun Thing Plus NORAW306

External Hardware

No.

Hardware Configuration

The WS2812B LED is on the PCB (as part of the design). Other than the USB-C for power/programming, no other external hardware is attached.

Version

latest dev (checkout manually)

IDE Name

Arduino IDE 2.3.2

Operating System

Windows 11

Auto Flash Mode

Enable

Erase All Flash Memory (4MB)

Disable

Standard Lib

Disable

Upload Speed

921600

Description

Fails when multiple calls to show() are used.

Note, Utilizing SPI1_PICO pin (PA_12, aka Arduino pin "14")

Sketch

#include "WS2812B.h"
#define NUM_OF_LEDS 1
WS2812B led(SPI1_PICO, NUM_OF_LEDS);

void setup() {
    led.begin();
}

void loop() {
  led.setPixelColor(0, 50, 0, 0);
  led.show();
  delay(500);
  led.setPixelColor(0, 0, 50, 0);
  led.show();
  delay(500);
}

Error/Debug Message

No debug messages. 

The error is experienced by watching the LED fail to blink multiple colors. It get's "stuck" on the first color (red) that is set by the first time show() is called in the main loop, but then never changes after that.

Reproduce remarks

No response

I have checked online documentation, FAQ, GitHub Wiki and existing/closed issues.

M-ichae-l commented 1 month ago

Thanks for the bug report and fix! Let us discusses further if needed.

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open for 14 days with no activity.