Created
August 1, 2020 23:57
-
-
Save kahenteikou/b080d764c60f75791b7d6ad8e5ecf5d4 to your computer and use it in GitHub Desktop.
Microbit school
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input.onButtonPressed(Button.A, function () { | |
radio.sendValue("template", input.temperature()) | |
radio.sendValue("lightly",input.lightLevel()) | |
}) | |
radio.onReceivedValue(function (name: string, value: number) { | |
if(name == "template") { | |
basic.showNumber(value) | |
basic.showString("C") | |
} | |
if(name == "lightly"){ | |
basic.showNumber(value) | |
basic.showString("lightly") | |
} | |
}) | |
radio.setGroup(1) | |
basic.forever(function () { | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment