Case 02: Call the Team Members Together
3. Case 02: Call the Team Members Together#
To create a magic wand that can send signals to the flying saucer.
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.
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.
Drag and set the infrared sending connection to P1 in the on start block.
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.
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.