Group Assignment Documentation: Communication Between Two ESP32C3 Boards
Group Members:

Objective:
To establish a communication system between two ESP32C3 boards, where messages can be sent and received seamlessly, using a communication protocol like Bluetooth, Wi-Fi, ESP-NOW,SPI,I2C,UART . We have taken I2C Communication to test our boards. This will help understand microcontroller communication, data transmission, and synchronization.
Work Process
1. Initial Setup:
- Charath Chander : Configuration and programming of the first ESP32C3 board (Sender).
- Sabareesh: Configuration and programming of the second ESP32C3 board (Receiver).
- Hariharan: Testing and debugging communication.
- Thompson: Documenting the process and assisting with troubleshooting.
- Installed necessary tools: Arduino IDE and required ESP32 libraries.

- Configured ESP32 boards by ensuring firmware is updated and libraries like esp_now.h (for ESP-NOW communication) or WiFi.h (for Wi-Fi communication) are included.


2. Implementation:
- Programmed ESP32C3 (Sender) to send a predefined message ("Hello from ESP32C3-Sender") using I2C protocol.
- Programmed ESP32C3 (Receiver) to listen for incoming messages and display them on the Serial Monitor.
- Simulated real-world testing conditions by introducing delays, testing at various distances, and checking message integrity.
- Kept a detailed log of challenges, successful milestones, and final implementation steps.
3. Challenges Encountered:
- Synchronizing the message format between Sender and Receiver to prevent garbled data.
4. Results:
- Successfully established a unidirectional communication system between two ESP32C3 boards using I2C.
- Messages sent from the Sender were accurately received and displayed by the Receiver.
5. Future Improvements:
- Implement bi-directional communication.
- Explore using MQTT protocol for scalability.
Reflection
Page 1: What I Learned as Charath Chander (Sender Configuration)
As the team member responsible for configuring the Sender ESP32C3, I learned:
- The fundamentals of the I2C protocol, including pairing devices.
- The importance of efficient message encoding to prevent data loss.
- Debugging skills, as I encountered issues with the Sender not initializing I2C properly.
- Collaboration benefits; team discussions provided insights into effective troubleshooting techniques.
Page 2: What I Learned as Sabareesh (Receiver Configuration)
My role involved setting up the Receiver ESP32C3, and I gained the following:
- Insights into message reception protocols and ensuring compatibility with the Sender.
- How to use debugging tools like the Serial Monitor to identify and fix communication issues.
- The impact of environmental factors on wireless communication and how to mitigate interference.
Sender Code:
#include <Wire.h>
void setup() {
Wire.begin(2);
Wire.onRequest(requestEvent);
}
void loop() {
delay(100);
}
void requestEvent() {
Wire.write("mayday mayday no power no thrust ");
}
Receiver Code:
#include <Wire.h>
void setup() {
Wire.begin();
Serial.begin(9600);
}
void loop() {
Wire.requestFrom(2, 17);
while (Wire.available()) {
char c = Wire.read();
Serial.print(c); // print the characters till all characters are complete
}
delay(500);
}
<<< Back to Lab Page