Arduino UNO and WS2812 100 Hz strobing?

Hi folks,

I’m wondering if it’s possible to generate a strobe effect using the Arduino UNO and WS2812 LED strip with different duty cycles?

Currently, I use the FastLED library connected to PWM pin 6 of my UNO board and I’m able to do basic things with the LED strip (change color, delay, blink, etc.).

I power the board through USB and use the 5V/GND from the same board to power the strip.

Now, I would like to set all my LEDS on the strip (6 of them) to strobe at 100 Hz (12.5 ms) frequency. I would also like the duty cycle to be 10%/90% (or 20%/80%) for HIGH/LOW.

My main loop code is currently like this (I’m away from my workbench at the moment):

// Apply a 10 and 90 percent ON OFF duty cycle
void loop() {
for (int i = 0; i < 6; i++){
leds = CRGB::White;

  • }*
  • delay(1); // This is supposedly in milli-seconds, so delay for 1*
  • for (int i = 0; i < 6; i++){*
    _ leds = CRGB::Black;_
    * }*
    * delay(9); // LEDs off, delay for 9 milli-seconds*
    I would just like to confirm if this would indeed generate a nice 10/90 duty cycle strobe effect across all my leds? Because it flashes at 100 Hz, I can’t tell (I don’t have access to a scope) if it’s working properly or not. I do see it “flicker” though.
    I’m trying to replicate a strobing effect that others have accomplished with standard RGB led strips as seen here:
    However, in their guide, they seem to play around with the Atmel register settings to achieve their effect. I’m not sure if they specifically ignored the WS2812 LEDs because it was impossible to accomplish or not.

Please delete this topic, I will re-post this under the LED section.