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.

1.png

Control Halocode B with Halocode A

Halocode A sets up LAN

1. Connect Halocode A

2.gif

 

2. Enable Upload mode

3.gif

 

3. Add an Events block when Halocode starts up, and a LAN block set up LAN named (mesh1)

4.gif

 

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.gif

 

5. Upload the program to Halocode A

6.gif

 

Halocode B joins LAN

6. Connect Halocode B

7.gif

 

7. Enable Upload mode

8.gif

 

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

9.gif

 

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

0.gif

 

10. Upload the program to Halocode B

01.gif

 

Programming result

11. Press the button Halocode A

02.gif

 

Challenge

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

03.gif

Download code


Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.