Week 11 - Networking And Communications

Assignment

Group assignment:

Send a message between two projects
Document your work to the group work page and reflect on your individual page what you learned

Individual assignment:

design, build and connect wired or wireless node(s) with network or bus addresses and a local input and/or output devices

Summary

This week, I explored networking and communications with a focus on the I2C protocol, which is widely used due to its fast speed and flexibility. I successfully established communication between two XIAO RP2040 microcontrollers via I2C, where one acted as the master and the other as the slave. I was able to send messages from the master to the slave reliably.

Connection Setup

To establish the I2C connection between the two XIAO RP2040 boards, I used the following pin configuration:
SDA to SDA
SCL to SCL
GND to GND

Photo: Pin Connections

Programming

After wiring the boards, I connected them to my computer via USB:
Master board on COM6
Slave board on COM13

Photo: Boards Connection to Computer

I opened two Arduino IDE windows, each connected to one of the ports.
Using the Serial Monitor, I was able to observe communication between the boards. The master successfully sent messages to the slave.

Photo: Serial Monitor Output

Notes

I encountered occasional malfunctions when both boards were connected to the computer simultaneously.
To avoid upload or recognition issues, it's more reliable to:
Connect and upload code to the first board (e.g., master).
Then disconnect it, connect the second board (slave), and upload its code.
Finally, connect both boards for communication.

References

Link to the resource page

Files

Master board codes
Slave board codes