Try using the Neopixel library. https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-use https://sbaronda.com/2020/09/20/sk6812-with-arduino-using-neopixel-library/ Those should get you started. Basically, instead of having your code directly turn a pin on or off, you tell it to set a color in the library and then run the show() command and the library will do all the pin toggling needed to actually control the LEDs.