-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjulie-tree.py
52 lines (44 loc) · 880 Bytes
/
julie-tree.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Imports go at the top
from microbit import *
import neopixel
import random
import time
import log
import math
def main():
np = neopixel.NeoPixel(pin1, 6)
np.clear()
np.show()
yellow = (255,255,0)
orange = (255,69,0)
blue = (0,0,255)
red =(255,0,0)
purple=(128,0,128)
green=(0,255,0)
# odsud
while True:
np[5] = yellow
np.show()
sleep(1000)
np[4] = orange
np.show()
sleep(1000)
np[3]= red
np.show()
sleep(1000)
np[2]= green
np.show()
sleep(1000)
np[1]= purple
np.show()
sleep(1000)
np[0]= blue
np.show()
sleep(8000)
np.clear()
np.show()
# sem
np.show()
if __name__ == '__main__':
main()
display.show(Image.HEART)