With Wi-Fi and User Cloud Message, Halocode can interact with the stage. In this project, we can make a remote control to light up or light off Halocode's LED ring with stage bulb.
Enable Upload mode
Set the background and sprite
1. Delete default sprite Panda
2. Under "Background", click "Costumes", and then add background "Office3"
3. Add sprite "bulb", and set the costume to "bulb2"
4. Adjust the size of bulb (150% of the original size), and place on the table
5. At the bottom of Blocks Area, click "+ extension", and then add User Cloud Message
6. Choose Variables block. Click "Make a Variable", and name it "frequency"
7. Drag an Events blockto the Scripts area, and then add a Variables block
8. Add an Events block, a Variables block , and a User Cloud Message block . Name the message "switch" and add another Variables block
9. Add a Control block, two Operators blocks and , a Variables block . Input "2" and "1"
10. Add two Looks blocks, and choose "bulb-1" and "bulb-2" respectively
Halocode connects Wi-Fi
11. Add an Events block, a Wi-Fi block . Input the network name and password of your Wi-Fi
12. Add a Control block, a Wi-Fi block , a Lighting block . Set the color to green. Add another Control block , and another Lighting block
Halocode receives user cloud message
13. Add a Wi-Fi block, a Control block , two Operators blocks and , a Wi-Fi block . Input "2" and "1"
14. Add two Lighting blocksand
15. Upload the program