11. Networking and communications

Group Assignement

This week I learned for the first time ever how to communicate between microcontrolers and devices. Or how it can be done through many different options.


Some of of the things to consider before deciding on a communication channel:



To start, I chatted a little with ChatGPT about the idea I had, the specificaitions of the boards I would be using and my vision to scale this assignement to my final project:


My initial question - I wanted to connect two boards: an ESP32-C3-Zero (with LEDs, buzzer, and microphone), and an ESP32 DevKit V1 (as controller).


The goal: Pressing a button on the DevKit triggers the LED + buzzer pattern on the C3, while the C3 keeps reading the microphone, and the DevKit receives that signal and prints a message in Serial.

I also asked which communication method would work best and how this could scale to my final project.

Chat's recommended solution: The best option is ESP-NOW, a direct, low-latency wireless protocol between ESP32 boards that does not require Wi-Fi infrastructure.

Why ESP-NOW:

Proposed architecture:

ESP32 DevKit V1 (Host / Controller)

ESP32-C3-Zero (Remote Node)


Key implementation steps

  1. Test basic ESP-NOW communication (send + receive + ACK)
  2. Trigger LED/buzzer sequence remotely
  3. Add microphone detection and send events back
  4. Structure messages using simple commands (TRIGGER, SOUND, ACK)

The process:

  1. Getting the MAC adress of each microcontroler.

  2. Testing a simple communication code to check everything works.
  3. Uploading the final version of the codes to each microcontroler:
  4. Checking the final version worked: