Control Multiple HaloCodes via LAN

Multiple HaloCodes can join the same LAN (Local Area Network), and communicate with each other. We can use Halocode to control others.

Control Halocode B with Halocode A

Halocode A sets up LAN

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)

Halocode A broadcasts on LAN

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

Halocode B joins LAN

6. Connect Halocode B

7. Enable Upload mode

8. Add an Events block when Halocode starts up, and LAN block join LAN named (mesh1)

Halocode B receives LAN broadcast

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

Programming result

11. Press the button Halocode A

Challenge

Challenge yourself. Can you make a new project like following example?

Download code


results matching ""

    No results matching ""