MakeCode is for CircuitPlayground Express Crickit and micro:bit Crickit - it does not support Feathers at this time!


MakeCode has a large variety of code blocks which take advantage of the things you can do with NeoPixels. But in general, THIS ONLY WORKS FOR THE CIRCUIT PLAYGROUND CRICKIT and Crickit for micro:bit. The Feather Crickit NeoPixels are connected to the onboard seesaw chip so use in MakeCode isn't currently supported.

Circuit Playground Express + Crickit with MakeCode

In the LIGHT block group, there is a special subgroup that pops below LIGHT when LIGHT is pushed called ... NEOPIXEL. This provides a huge number of blocks to work with NeoPixels that are not on your Crickit or the microcontroller on Crickit like a Circuit Playground Express.

For Circuit Playground Express, the Crickit NeoPixel Terminal is connected to CPX Pin A1. When you use the MakeCode NeoPixel blocks to manipulate your externally connected NeoPixels, you need to use the NEOPIXEL subgroup block labeled set strip to create strip.

For the code below, I have connected a 30 NeoPixel strip to the Crickit NeoPixel terminal block. When the program starts, the on start code up the variable named strip to refer to a NeoPixel strip connected to A1 (which all Crickit strips are connected to) with 30 NeoPixels on it (You have to click the + on the block to specify the pin A1 and add the number of NeoPixels.

Then the program shows the rainbow animation on the strip forever. You can change the animation type or do lots of other things on your strip. It's that easy!

Crickit FeatherWing

There currently is no MakeCode support for the FeatherWing Crickit! Please use Arduino or CircuitPython for your Feather+Crickit needs

micro:bit and Crickit

For micro:bit, there is a small sun icon on Pin P16 on Crickit to help you remember that is the pin connected for NeoPixels.

You need to add the NeoPixels extension to MakeCode for micro:bit for NeoPixel control. Click the Advanced button then Add Package. Select the Adafruit NeoPixels extension. You will now have a new code block group called Neopixel which has the blocks you want to control the NeoPixel strip.

The code below does what the above code does for CPX - creates a strip of 30 NeoPixels connected to Pin 16 and then displays a rainbow animation forever.

This guide was first published on Jul 18, 2018. It was last updated on Jun 16, 2024.

This page (MakeCode) was last updated on Mar 08, 2024.

Text editor powered by tinymce.