-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
54 lines (54 loc) · 1.24 KB
/
main.ts
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
radio.onReceivedString(function (receivedString) {
power = radio.receivedPacket(RadioPacketProperty.SignalStrength)
if (power <= -111) {
basic.clearScreen()
basic.showLeds(`
. . . . .
. . . . .
. . . . .
. . . . .
# # # # #
`)
} else if (power <= -94) {
basic.clearScreen()
basic.showLeds(`
. . . . .
. . . . .
. . . . .
# # # # #
# # # # #
`)
} else if (power <= -77) {
basic.clearScreen()
basic.showLeds(`
. . . . .
. . . . .
# # # # #
# # # # #
# # # # #
`)
} else if (power <= -60) {
basic.clearScreen()
basic.showLeds(`
. . . . .
# # # # #
# # # # #
# # # # #
# # # # #
`)
} else if (power <= -44) {
basic.clearScreen()
basic.showLeds(`
. . . . .
# # # # #
# # # # #
# # # # #
# # # # #
`)
}
})
let power = 0
radio.setGroup(1)
basic.forever(function () {
radio.sendString("I LOVE wolips.ru")
})