from machine import * from neopixel import NeoPixel from time import sleep_ms from random import randint
s1 = NeoPixel(Pin(7), 26) # sapin 1 s2 = NeoPixel(Pin(5), 27) # sapin 2 s3 = NeoPixel(Pin(3), 23) # sapin 3 t1 = NeoPixel(Pin(6), 9) # tronc 1 t2 = NeoPixel(Pin(4), 9) # tronc 2
g1 = NeoPixel(Pin(8), 8) # guirlande 1 g2 = NeoPixel(Pin(2), 16) # guirlande 2
b1 = NeoPixel(Pin(9), 16) # boules 1 haut et milieu b2 = NeoPixel(Pin(10), 16) # boules 2 haut et milieu
b3 = NeoPixel(Pin(11), 16) # boules 3 bas
# Allumage sapin for x in range(0, 26): s1[x] = (0, 255, 0) s1.write()
for x in range(0, 27): s2[x] = (0, 255, 0) s2.write()
for x in range(0, 23): s3[x] = (0, 255, 0) s3.write()
# Allumage tronc sapin for x in range(0, 9): t1[x] = (165, 42, 42) t1.write()
for x in range(0, 9): t2[x] = (165, 42, 42) t2.write()
# Allumage guirlandes
for x in range(0, 8): g1[x] = (255, 0, 0) g1.write()
for x in range(0, 16): g2[x] = (255, 0, 0) g2.write()
# Allumage boules for x in range(0, 16): b1[x] = (0, 0, 255) b1.write()
for x in range(0, 16): b2[x] = (255, 255, 0) b2.write()
for x in range(0, 16): b3[x] = (0, 255, 255) b3.write()
|