Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue related to writing RGB LED fast in a row #9374

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

SuGlider
Copy link
Collaborator

Description of Change

When writing to the same GPIO using RMT, like in a loop, it is necessary to use rmtWriteBlocking() instead of rmtWrite() to avoid issues with FreeRTOS and IDF 4.4.x.

This PR fixes neopixelWrite() (as well as digitalWrite(RGBLED, state)`) in order to avoid such issue.

Tests scenarios

Tested with ESP32-S3

void setup() 
{
  Serial.begin(115200);
  Serial.println("");
  Serial.println("");
}

void loop() 
{
  Serial.println("blink slow");
  for (auto i = 0; i < 10; i++)
  {
     digitalWrite( LED_BUILTIN, i & 1 );
     //uint8_t color = i & 1 ? 32 : 0;
     //neopixelWrite( 48, color, color, color);  // 47 is Lolin S3 onboard LED
     delay(100);
  }
    
  Serial.println("blink fast");
  for (auto i = 0; i < 10; i++)
  {
     digitalWrite( LED_BUILTIN, i & 1 );
     //uint8_t color = i & 1 ? 32 : 0;
     //neopixelWrite( 48, color, color, color);
  }
}

Related links

Closes #9369

@me-no-dev me-no-dev merged commit 2dcb28f into release/v2.x Mar 18, 2024
45 checks passed
@me-no-dev me-no-dev deleted the SuGlider-patch-2 branch March 18, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Rapid NeoPixel updates cause apparent hang on ESP32-S3
3 participants