Skip to content

UNO R4 WiFi NeoPixel interrupts(?) cause artifacts on a strip #1543

Closed

Description

@Tai-Min

Running this code causes random color / flickering on the whole strip:

#include <Arduino.h>
#include <FastLED.h>

namespace
{
  CRGB leds1[49];
  CLEDController *ctrl1 = &FastLED.addLeds<NEOPIXEL, 7>(leds1, 49);
}

void setup()
{
 Serial.begin(9600);

}

uint8_t bright = 0;
void loop()
{
  fill_solid(leds1, 49, CRGB::Green);
  //noInterrupts();
  ctrl1->showLeds(bright);
  //interrupts();
  bright++;
  delay(10);
}

From my tests it seems that using any peripheral based on interrupts such as Serial or I2C (I've tested it with LiquidCrystal_I2C library) causes the strip to go wild randomly. Uncommenting noInterrupts(); and interrupts() above seems to fix the issue.

I've tested it using PlatformIO

Activity

  1. samguyer commented on Oct 10, 2023

    @samguyer
    Contributor

    Hello! The latest main branch has support for Uno R4. But it's not in a regular release yet.

  2. sparky650 commented on Oct 24, 2023

    @sparky650
    Contributor

    I had a similar issue, and was able to fix it by adjusting the bit timing in clockless_arm_renesas.h. I tested your code and was able to replicate the flicker with the old timing. The new timing gave flicker free output with and without interrupts. Here is the PR: #1554

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions