
PROJECTS: LED Moon/Period Calendar
import board
import neopixel
Then define the pixel pin on the board to control
all 250 LEDs. If you’re not using the 2040 Stamp
Round Carrier, ensure that you have the right
pixel pin for your board. Define the number of
NeoPixels:
pixel_pin = board.GP11
num_pixels = 250
Next, write an array for a total of 30 star units
(moons) of 10 LEDs each. Make sure to get the
numbers right — remember, some LEDs overlap!
moons = [
[0, 1, 2, 3, 4, 5, 6, 7,
8, 9],
[10, 6, 7, 11, 12, 13, 14,
15, 16, 17],
[18, 14, 15, 19, 20, 21, 22,
23, 24, 25],
[26, 22, 23, 27, 28, 29, 30,
31, 32, 33],
[34, 30, 31, 35, 36, 37, 38,
39, 40, 41], ...