Last active
October 21, 2018 04:09
-
-
Save dimitarminchev/e1ecf46a10e90ffa4fb79222ce354eb6 to your computer and use it in GitHub Desktop.
NASA2018 MicroBit Control
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
/* | |
"THE A TEAM" proudly presents the project "ROV4KIDS" from the challenge "INVENT YOUR OWN CHALLENGE" | |
NASA Space Apps Challenge 2018, Burgas Free University, Bulgaria | |
*/ | |
// Micro:Bit On Start | |
radio.setGroup(1) | |
radio.sendNumber(0) | |
basic.showIcon(IconNames.No) | |
// Event Handler for Button A+B | |
input.onButtonPressed(Button.A, () => { | |
radio.sendNumber(1) | |
basic.showArrow(ArrowNames.West) | |
}) | |
// Event Handler for Button B | |
input.onButtonPressed(Button.B, () => { | |
radio.sendNumber(2) | |
basic.showArrow(ArrowNames.East) | |
}) | |
// Event Handler for Button A | |
input.onButtonPressed(Button.AB, () => { | |
radio.sendNumber(3) | |
basic.showArrow(ArrowNames.North) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"THE A TEAM" proudly presents the project "ROV4KIDS" from the challenge "INVENT YOUR OWN CHALLENGE"
NASA Space Apps Challenge 2018, Burgas Free University, Bulgaria