SparkFun gator:bit v2 Hookup Guide
Example Project: LED Animations
Installing the NeoPixel Extension for Microsoft MakeCode
Previously, the libraries were referred to as MakeCode packages. They are now referred to as MakeCode extensions.Doing a Google search for "makecode packages change", the first search result is Frequently Asked Questions - Microsoft MakeCode, which at the end of the article details that information.
To use the addressable LEDs on the gator:bit, you will need to install a MakeCode extension. Click on Advanced -> Add Extension. Search for the neopixel extension and click on the extension to add it to your list of usable extensions.
Re-create the following code into your MakeCode editor or download the example by clicking the download button to test it out!
This program starts out with a rainbow pattern across the LEDs and then turns the LEDs off sequentially from the left. Once they have all turned off, a new animation will start sequentially from the left; the LEDs will turn blue but will fill the previous LEDs with a random color rather than turning off. The brightness is turned down to 75 to save your eyes and your battery life!