MB3: Long Pass
MAKECODE
Diagram
Code - Team One
Player A: The code for player A requires 1 micro:bit. On start the radio group will be set to 1 and the ball will be displayed. Then on shake, only if the micro:bit has an LED that is lit up at position x=2, y=2 (the middle) of the LED grid it will clear the screen and send out a number via radio to player B. This if statement ensures that the ball can only be passed when a player has it.
Code available here
Player B: The code for player B requires 1 micro:bit. On start the radio group will be set to 1. It is important that the group is initially set to the same group as player A so that player B can receive a number and display the ball. Once a number has been received and the ball is displayed the group needs to be changed to 2 in order to pass the ball to player C. On shake, the screen will clear and the microbit will send out a number to be received by player C which signals that the ball has been passed and can now be received.
Code available here
Player C: The code for player C requires 1 micro:bit. On start the radio group will be set to 2 so that the micro:bit can receive the number sent out by player B. Upon receive a number in group 2 a basketball will be displayed. On shake the screen will clear and the group will be changed to 3 in order to pass the ball to Player D. On shake the micro:bit will also send out a number to be received by Player D, signalling that the ball has been passed.
Code available here
Player D: The code for player D requires 1 micro:bit. On start a basket will be displayed and the radio group will be set to 3 in order to receive numbers sent from player C. Once player D receives a number, it will display a random number from 1 to 3 representing the score.
Code available here
Important: The code for team two is identical to the code or team one except for the group numbers. Instead Player A for Team 2 must start on group 4. Player B must also start on group 4 but switch to group 5 on shake. Player C must start on group 5 and switch to group 6 on shake. Lastly, Player D will start on group 6 and not change.
Note: Using tape, it is recommended that the microbits be labelled with the player letter to avoid confusion.
Game
Pass the ball as fast as possible | 2 teams of 4 players | 4 micro:bits per team
Players will divide into teams of 4 where each player gets a microbit. Players will stand in order based on the micro:bit that they have. On "Go!" players from both teams will take turns passing the ball to their teammates. The team to have the ball reach their last player and score first wins.