Case 02: Call the Team Members Together
Contents
3. Case 02: Call the Team Members Together#
3.1. Purpose#
To create a magic wand that can send signals to the flying saucer.
3.2. Materials#
3.3. Products Link#
3.4. Background#
Though the guard of the insects is expelled, the battle alarms their nest with so many insects coming out. Xiao En and his team members can do nothing but to leave bewilderingly. They arrive at a safe place but are lost with each other, let’s create a magic wand to send signals for calling the members together.
3.5. Software#
3.6. Programming#
Step 1#
Click “Advanced” in the MakeCode drawer to see more choices.
We need to add a package for programming, . Click “Extensions” in the bottom of the drawer and search with “magicwand” in the dialogue box to download it. (Kindly note this package is still in the verifying process and pls search with “https://github.com/elecfreaks/pxt-magicwand “ before it’s ready)
Note: If you met a tip indicating that the codebase will be deleted due to incompatibility, you may continue as the tips say or build a new project in the menu.
Step 2#
Drag and set the infrared sending connection to P1 in the on start block.
Step 3#
Drag the while tilting to the right side block, programme inside with the block if the button in P2 is pressed, then set the magic level as primary and then release the magic once.
Drag the while tilting to the left side block, programme inside with the block if the button in P2 is pressed, then set the magic level as advanced and then release the magic once.
Link#
Link: https://makecode.microbit.org/_gyoc4bTf1cWL
You may also download it directly below:
Result#
If the magic wand tilts to the right side, press the button to take off the flying saucer.
If the magic wand tilts to the left side, press the button to land off the flying saucer.