Control Multiple HaloCodes via LAN
Last updated
Last updated
Multiple HaloCodes can join the same LAN (Local Area Network), and communicate with each other. We can use HaloCode to control others.
1. Connect HaloCode A
2. Enable Upload mode
3. Add an Events block when HaloCode starts up, and a LAN block set up LAN named (mesh1)。
4. Add an Events block when button is pressed, and a LAN block broadcast () on LAN. Name the message "light"
5. Upload the program to HaloCode A
6. Connect HaloCode B
7. Enable Upload mode
8. Add an Events block when HaloCode starts up, and LAN block join LAN named (mesh1)
9. Add a LAN block when receiving LAN broadcast (), and input "light". Add a Lighting block all LEDs light up (), a Control block wait () seconds, and another Lighting block light off all LEDs
10. Upload the program to HaloCode B
11. Press the button HaloCode A
Challenge
Challenge yourself. Can you make a new project like following example?