]> vault307.fbx.one Git - m5Atom.git/blob - colorSwirl.py
m5Atom with LED matrix specific code
[m5Atom.git] / colorSwirl.py
1 from machine import Pin
2 from neopixel import NeoPixel
3 import time
4
5 # Definitions for the ATOM Matrix
6 LED_GPIO = const(27)
7 matrix_size_x = const(5)
8 matrix_size_y = const(5)
9 is_atom_matrix = True
10
11 np = NeoPixel(Pin(LED_GPIO), matrix_size_x * matrix_size_y)
12
13 while True:
14 np.fill((175,50,0))
15 np.write()
16 time.sleep(0.5)
17 np.fill((175,25,0))
18 np.write()
19 time.sleep(0.5)
20 np.fill((175,0,5))
21 np.write()
22 time.sleep(0.5)
23 np.fill((150,0,25))
24 np.write()
25 time.sleep(0.5)
26 np.fill((100,0,75))
27 np.write()
28 time.sleep(0.5)
29 np.fill((50,0,100))
30 np.write()
31 time.sleep(0.5)
32 np.fill((50,0,150))
33 np.write()
34 time.sleep(0.5)
35 np.fill((25,0,175))
36 np.write()
37 time.sleep(0.5)
38 np.fill((0,25,175))
39 np.write()
40 time.sleep(0.5)
41 np.fill((0,50,175))
42 np.write()
43 time.sleep(0.5)
44 np.fill((0,75,175))
45 np.write()
46 time.sleep(0.5)
47 np.fill((0,150,175))
48 np.write()
49 time.sleep(0.5)
50 np.fill((0,175,175))
51 np.write()
52 time.sleep(0.5)
53 np.fill((5,150,100))
54 np.write()
55 time.sleep(0.5)
56 np.fill((50,75,0))
57 np.write()
58 time.sleep(0.5)
59 np.fill((100,50,0))
60 np.write()
61 time.sleep(0.5)
62 np.fill((150,50,0))
63 np.write()
64 time.sleep(0.5)