Embedded programming
Microcontroller Selection
XIAO ESP32-C3
The XIAO ESP32-C3 microcontroller was selected for this project due to its low power consumption and advanced connectivity capabilities. This module includes Wi-Fi and Bluetooth, enabling real-time data transmission to an online platform for remote monitoring. These features make it an ideal choice for monitoring applications and control systems integrated into IoT projects.
Code Development
The Arduino IDE was used to program the XIAO ESP32-C3 microcontroller.
I2C Communication
I2C (Inter-Integrated Circuit) communication is a serial communication protocol that allows multiple devices, such as sensors, microcontrollers, and other electronic components, to communicate with each other using only two lines: a data line (SDA) and a clock line (SCL). I2C is a master-slave protocol, where the master device controls the communication and can interact with several slave devices on the same bus.
Advantages
One of the advantages of I2C is its simplicity, as it uses fewer wires than other communication protocols, making it ideal for embedded systems and devices with a large number of components. Additionally, it allows multiple devices to connect on the same bus without interference, each identified by a unique address. This protocol is commonly used in applications requiring moderate and straightforward data transmission, such as sensors and displays.
Software Testing and Debugging
During code development, extensive testing was carried out to ensure the correct functioning of the microcontroller and data transmission. Arduino IDE provides debugging tools that allowed verification of each function and efficient error correction within the code. Testing focused on ensuring stable and reliable I2C communication and Wi-Fi connectivity to support continuous monitoring of generated data.