13. Embedded Networking and Communications

There are different ways of connecting microcontrollers between them, so for the task of this week I decided to use the Bluetooth of the Xiao ESP32-C3 to connect two of them and a wired connection for the Xiao RP2040. The boards I used are the following:

With their corresponding paths:

Wired Connection

The wired conection was between the Xiao ESP32-C3 and the Xiao RP2040 as master and slave, respectively. The communication between both boards was through an I2C conection using the SCL and SDA ports. When using this type of communication, it is important to have a 1kΩ resistor connecting the 3V port with the SCL and SDA ports (only needed in one board); which is considered in the week 4 board.

The master microcontroller send information, while the slave processes it. In this case, the master send the information of the state of the push button and the slave receives it and decides what to do. For this code, it was something small in which the slave turns on a LED when it is pressed and turns it off when it isn't.

Master

Slave

Bluetooth Conection

Getting Started

For the bluetooth conection I used two Xiao ESP32-C3 boards. First of all, I tried codes from the Seed Studio Wiki and used them to make the master recognize the other one:

Here, I instantly noticed the first device: "DanisitaBBQ" is the name I put to the other Xiao for it to be detected.

Useful links

Code Example

Gallery

Video


Files

Wired Conection