HaloCode's Remote Control Deck
Sign in to mBlock 5
We can use "User Cloud Message" to control HaloCode remotely. We need to sign in to mBlock 5 first.
Toggle on Upload mode
Connect to the internet
1. Drag an Events blockand a Wi-Fi block . Input the Wi-Fi name and password.
2. We want to know when the Wi-Fi is successfully connected. Add a Control block, a Wi-Fi block , and a Lighting block .
Add a sprite
3. Under "Sprites", click "+". From the pop-up Sprite Library window, choose "Balloon1" from the Props category.
4. Right click "Balloon1" to make a duplicate. Change the costume to "c", namely color purple.
5. Delete default sprite "Panda".
Program the sprite
6. Click "+" in the Blocks area to add "User Cloud Message".
7. Program the blue balloon. Add an Events blockand a User Cloud Message block . Name the message "blue".
Add some special effects to the balloon
8. When the balloon is clicked, we want it to appear like being clicked. When clicked, the balloon gets brighter and bigger, and goes back to original color and size in 0.3 second. Add the following blocks:, , , , .
9. Likewise, we can program the purple balloon. Add an Events blockand a User Cloud Message block . Name the message "purple". Apply the same special effects.
HaloCode receives user cloud message
10. Under "Devices", select "HaloCode".
11. Add a Wi-Fi blockand input message "blue".
Set HaloCode's LEDs
12. Add a Lighting block, change the color to blue. Add a Control block and another Lighting block .
13. Likewise, for receiving the "purple" message, duplicate the script, and change LED color to purple.
14. Upload the program to HaloCode. Disconnect HaloCode from the PC, and use a battery box to power HaloCode. Click the balloons on stage, and check the LEDs of HaloCode.