Using the Crickit Single LED

It isn't recommended that you use the Crickit NeoPixel LED because we use it to report when the battery is low! However, if you're curious, here's how to do it

The On-board Crickit NeoPixel is great for providing status information to the user. It can also function as a light to help you find your bot in the dark. 

This page will quickly show you how to use this NeoPixel.

MakeCode

You can use the three special NeoPixel blocks in the CRICKIT block group extension to change the single NeoPixel on-board Crickit. They work just like the NeoPixel blocks under the LIGHT block group but just for the one Crickit pixel.

You can independently set a color for the NeoPixel, turn it off, or set the brightness.

CircuitPython

The internal NeoPixel is on the Crickit's seesaw controller, pin #27. In addition to importing the adafruit_crickit library you'll need the adafruit_seesaw.neopixel library also.

# Using Crickit's onboard NeoPixel
# See http://www.color-hex.com/ for more colors and find your fav!
from adafruit_crickit import crickit
from adafruit_seesaw.neopixel import NeoPixel

crickit_status_pixel = NeoPixel(crickit.seesaw, 27, 1)  # one NeoPixel pin 27

# Fill them with our favorite color "#0099FF light blue" -> 0x0099FF
crickit_status_pixel.fill(0x0099FF)

while True:
    pass

The fill function will set the pixel to the hex code for red, green, and blue for the pixel. to turn the NeoPixel off, use a value of zero, such as crickit_status_pixel.fill(0x000000).

This guide was first published on Jul 18, 2018. It was last updated on Jul 18, 2018. This page (Using the Crickit Single LED) was last updated on May 23, 2019.