-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathroger.py
84 lines (68 loc) · 935 Bytes
/
roger.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import machine
import time
LED_PIN = 2 # D4
led = machine.Pin(LED_PIN, machine.Pin.OUT)
def dot():
led.off()
time.sleep(0.15)
led.on()
time.sleep(0.15)
def dash():
led.off()
time.sleep(0.45)
led.on()
time.sleep(0.15)
def roger():
led.off()
dot()
dash()
dot()
def blink3():
dot()
dot()
dot()
dash()
dash()
def blink4():
dot()
dot()
dot()
dot()
dash()
def blink5():
dot()
dot()
dot()
dot()
dot()
def blink6():
dash()
dot()
dot()
dot()
dot()
def blink7():
dash()
dash()
dot()
dot()
dot()
def blink8():
dash()
dash()
dash()
dot()
dot()
def blink(i):
if i == 3:
blink3()
elif i == 4:
blink4()
elif i == 5:
blink5()
elif i == 6:
blink6()
elif i == 7:
blink7()
elif i == 8:
blink8