How to turn off all pixels on a 24 Ring

Hello, new to the forum.

I am controlling a ring 24 without issues but would like to make the code a bit cleaner. Right now I am turning off the pixels by setting all pixels to RGB(0,0,0) and then doing a ring.show(). Is it possible to do this with one command?

I would have thought that either ring.clear() or ring.show() (after another ring.show) would turn the whole ring off.

Thanks

Alfredo

Easy enough to test it.

I believe the Adafruit library keeps a buffer of the state of all the LEDs and ring.show sends that data to the hardware. So two shows in a row will send whatever's in the buffer twice meaning no change on the second.

I expect what you need is clear and then show.

Yes, that is it!

First Clear, then Show.

Thank you.

Alfredo

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.