You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Arduino Zero millis() and FastLED.delay() are 4x slower with WS2812B #633
I have started to play around with the native FastLED support for the Arduino Zero (instead of using FastLED's math with Adafruit's ZeroDMA). I loaded the ColorPalette example, and noticed that the framerate and update frequency were ¼ of the actual speed. Changing FastLED.delay(1000 / UPDATES_PER_SECOND); to FastLED.delay(1000 / UPDATES_PER_SECOND / 4); and uint8_t secondHand = (millis() / 1000) % 60; to uint8_t secondHand = (millis() *4 / 1000) % 60; resolved the issue. This only occurs when FastLED is being constantly updated: changing FastLED.delay to delay resulted in exactly 1 FPS, not ¼ FPS.
This issue occured with a strip of 240 WS2812Bs and an off-brand Arduino Zero using the same board definition and bootloader.
I can confirm this as well. I have 200 LEDs and noticed a delay of about 3x what it should be. I suspect this is because FastLED.show() is disabling interrupts while shifting out data and thus millis() is not being updated. I compensated in my code in a similar way to the above.
Activity
jeremyste commentedon Dec 7, 2018
I can confirm this as well. I have 200 LEDs and noticed a delay of about 3x what it should be. I suspect this is because
FastLED.show()is disabling interrupts while shifting out data and thusmillis()is not being updated. I compensated in my code in a similar way to the above.focalintent commentedon Jan 20, 2019
Yeah - the SAMD code doesn't attempt to try to fix the clock - if interrupts are enabled then millis should update as expected.
ci(probe): drop ZCCACHE_PROBE_BYPASS=1 setdefault (#3129 A9) (#3199)