Controlling Neopixels

ScratchGPIO can control neopixels but your first have to install the Pimoroni UnicornHAT software.

Once you’ve done that, you can connect a set of neopixels up to the Pi 5V,Gnd and Pin12 and control them from Scratch

How to use

create a variable called AddOn and then make a little script

OnGreenFlag

..set AddOn to Neopixels (you can add a number on the end to tell if max num of neopixels – default is 64)

You can the nuse the following syntax

broadcast pixel 1 red (will turn 1st pixel to red) (valid colors are red/green/blue/magenta/cyan/yellow/white/off)

broadcast AllOff (turn them all off)

broadcast AllOn Blue (turn all pixels Blue)

Note change to pixelson/off in Scratchgpio8