> For the complete documentation index, see [llms.txt](https://learn.pakronics.com.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.pakronics.com.au/halocode-1/code-with-mu-a-simple-python-editor/examples/basic-project/untitled-4.md).

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

![](/files/-Lpg71govJszUnRGBdKC)

## Control HaloCode B with HaloCode A

### HaloCode A sets up LAN

1\. Connect HaloCode A

![](/files/-Lpg71gpaM6aOK6LIZUI)

2\. Enable Upload mode

![](/files/-Lpg71gq1Z9w074vsyQD)

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

![](/files/-Lpg71gr7TywIgxN_4_V)

### 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"

![](/files/-Lpg71gsqPYlOiroy-Jg)

5\. Upload the program to HaloCode A

![](/files/-Lpg71gtQEGRLbXoH-G0)

### HaloCode B joins LAN

6\. Connect HaloCode B

![](/files/-Lpg71guAOUq1Axhmpc8)

7\. Enable Upload mode

![](/files/-Lpg71gv6wgVY7by5ywQ)

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

![](/files/-Lpg71gwBcYZzV1n5SMZ)

### 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

![](/files/-Lpg71gx0ECSIMyOjubk)

10\. Upload the program to HaloCode B

![](/files/-Lpg71gy9h4B6g742VqA)

### Programming result

11\. Press the button HaloCode A

![](/files/-Lpg71gzuIV3HBdmuecg)

**Challenge**

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

![](/files/-Lpg71h-MrRLEw_wGpLY)
