Programming with MicroPython: NeoPixel
Import FutureBoard Library
Import the Library to make use of its functions.
from future import *06: Neopixel
1. Initiate a NeoPixel Strip
NeoPixel(pin, num)Initiates a NeoPixel Strip with a number of LEDs on the selected pin.
Use P7 and 3 for the built-in LED Strip.
2. Setting Color for 1 LED
setColor(i, color)Parameter i denotes the id of the LED.
Neopixel accepts RGB value or built-in color names.
3. Setting Color for All LED
setColorAll(color)Neopixel accepts RGB value or built-in color names.
4. Update Display
Update the display to show the effects.
Sample Program
Last updated