-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
28 lines (28 loc) · 923 Bytes
/
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
input.onSound(DetectedSound.Loud, function () {
music.playSoundEffect(music.createSoundEffect(WaveShape.Noise, 5000, 4882, 255, 255, 1000, SoundExpressionEffect.None, InterpolationCurve.Linear), SoundExpressionPlayMode.InBackground)
radio.sendString("Name: Julek")
})
radio.onReceivedNumber(function (receivedNumber) {
basic.showString("Num: ")
basic.showString("" + receivedNumber)
})
input.onLogoEvent(TouchButtonEvent.Pressed, function () {
radio.sendNumber(click)
click += 1
})
radio.onReceivedString(function (receivedString) {
basic.showString("Str: ")
basic.showString(receivedString)
})
radio.onReceivedValue(function (name, value) {
basic.showString("N:V: ")
basic.showString(name)
basic.showString(":")
basic.showString("" + value)
})
let click = 0
radio.setGroup(255)
radio.sendValue("age", 12)
basic.forever(function () {
basic.showArrow(ArrowNames.North)
})