13. How to Use One CyberPi to Control Another in the Same LAN

This article applies to:

mBot2, mBot Neo, and CyberPi.


In a Nutshell



What's Lan Communication?

The default local area network channel for all CyberPi is 6. When devices are on the same channel in the local area network, they do not need to connect to the internet. They can send messages to each other through LAN broadcasting. Theoretically, a CyberPi can send messages to any number of other CyberPis.

In simple terms, CyberPi can use the "LAN" blocks in the Makeblock App to send broadcast messages to other CyberPi devices. Other CyberPi devices will respond accordingly based on the received messages, thus achieving mutual control.


Step by Step

#1 Prepare two CyberPi (A and B).



#2 Connect the CyberPis to mBlock with upload mode.

For details, please see this guide: https://support.makeblock.com/hc/en-us/articles/15811949853335



#3 Compile the broadcast program for CyberPi A.

These blocks are for CyberPi A to broadcast a message via LAN.

Upload the program to CyberPi.



#4 Compile the receiving program for CyberPi B.

These blocks are for CyberPi B to capture the message and respond accordingly.

Upload the program to CyberPi.



#5 Restart both CyberPi devices.

For CyberPi A (Connected with the Computer)

Unplug and replug the USB cable to restart.


For CyberPi B (Mounted on mBot2 Shield)

Turn on and off the switch to restart.


After both CyberPis restart, press Button B on CyberPi A.

CyberPi B will says 'hi' and move forward for 1 second.


Related Knowledge



Got Questions?

Feel free to contact us at:



Help Us Solve Faster

We have listed some useful information you can provide to us.

When you contact us, the more information you provide,

the better informed we will be and the quicker we can advise and answer your questions.


Not Sure Where to Find the Version Info?


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



Article is closed for comments.