During Week 11 – Networking and Communications, the main objective was to understand how different electronic systems can communicate with each other through wired or wireless connections. This involved working with microcontrollers to send and receive data, enabling interaction between multiple devices instead of operating as standalone systems.
The workflow included key stages such as selecting the communication protocol, configuring connections, programming data exchange, and testing communication between devices. Through this process, I learned how to establish reliable communication, manage data transmission, and ensure proper synchronization between systems.
This assignment helped me understand how electronic devices can share information and work collaboratively, strengthening my skills in communication protocols, programming, and embedded system integration. 🌐⚡
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
For the group assignment, we worked at Universidad del Pacífico in Lima, where we developed a networking-based system using two microcontroller boards. In this activity, we focused on establishing communication between both boards to exchange data in real time. We used MQTTX as a communication platform, creating a server connected to WiFi and enabling interaction with a XIAO ESP32 S3.
As a team, we programmed the system using Arduino IDE to send and receive data through the network. One board was connected to a pushbutton, which counted the number of presses, while the other board received this data and displayed it on a screen. This allowed us to observe how communication protocols enable synchronization between devices, where an input in one system generates a response in another.
Through this collaborative experience, we gained a deeper understanding of networking and communication in embedded systems, learning how to transmit data over WiFi, manage real-time interactions, and coordinate multiple devices working together. This knowledge is essential for developing more advanced interconnected systems for our individual projects. 🌐⚡
Here is the link to learn more about the group project.
In this stage, we implemented communication between two independent projects using a WiFi-based network. By using MQTTX as a communication platform, we established a simple server that allowed both devices to exchange data in real time. Each project was connected through a XIAO ESP32 S3, enabling wireless communication between them.
One of the boards was programmed to send a message based on a pushbutton input, counting the number of presses and transmitting this information through the network. The second board received the message and displayed the data on a screen, demonstrating how an action in one system can generate a response in another. This process allowed us to understand how to send, receive, and interpret messages between two projects, forming the basis of networked embedded systems. 🌐📡
This assignment helped me understand how embedded systems can communicate with each other through a network instead of working independently. By using MQTTX, I was able to visualize how data is sent and received in real time, making the concept of IoT much more practical. I also learned how a simple input, like a pushbutton, can be transformed into a message and transmitted using a XIAO ESP32 S3 to generate a response on another device.
Additionally, I realized that working with communication between two systems is more complex, as it involves debugging connection issues and ensuring correct data transmission. Despite these challenges, this experience strengthened my problem-solving skills and gave me a better understanding of networking protocols. Overall, it provided a solid foundation for integrating multiple devices in future projects, especially for developing more interactive and connected systems. 🌐⚙️
individual Assignment:
° design, build and connect wired or wireless node(s) with network or bus addresses and a local input and/or output device(s)
In this individual assignment, I focused on networking and communication between devices by developing a system that connects two boards through a wireless network. The objective was to understand how a microcontroller can send and receive data, enabling interaction between independent systems instead of working in isolation.
Through this process, I used MQTTX as a communication platform to transmit messages between two XIAO ESP32 S3 boards. One device was responsible for sending data based on a pushbutton input, while the other received the information and displayed it, allowing me to explore real-time data exchange and system synchronization.
This assignment helped me strengthen my understanding of communication protocols and IoT concepts, bringing me closer to developing more advanced, connected, and interactive systems for my final project. 🌐📡
For this assignment, I used the SEEED STUDIO XIAO ESP32-S3 as the main controller, taking advantage of its built-in WiFi capabilities to enable communication through RemoteXY. I integrated an OLED display to visualize information in real time and an RGB LED module to generate visual outputs with different colors. Additionally, the system was connected to the laboratory WiFi network, allowing remote control and interaction from a mobile device using the RemoteXY platform. This setup helped me understand how to combine wireless communication with visual output devices in an embedded system. ⚙️📡
| Item | Component | Amount |
|---|---|---|
| 1 | SEEED STUDIO XIAO ESP32-S3 | 1 |
| 2 | OLED DISPLAY (I2C) | 1 |
| 3 | RGB LED MODULE | 1 |
| 4 | Resistors (for RGB LED) | 3 |
| 5 | Header Pins / Connectors | 3 |
| 6 | WiFi Network (Laboratory) | 1 |
| 7 | RemoteXY Platform | 1 |
The PCB integrates the SEEED STUDIO XIAO ESP32-S3 as the main microcontroller, taking advantage of its built-in WiFi capabilities to enable wireless communication. It is connected to essential components such as resistors and header pins for proper interfacing and circuit stability.
In this setup, I incorporated an OLED display to provide real-time visual feedback and an RGB LED module to generate different light outputs. Additionally, the system is linked to the RemoteXY platform through the laboratory WiFi network, allowing remote control and interaction. All these components work together to create a connected electronic system capable of producing dynamic visual responses. ⚙️📡
The electronic components used in this project were sourced from Saisac Mecatrónica, a specialized electronics supplier located in the city of Lima. This store offers a wide range of components suitable for PCB design and prototyping. For reference, the exact location of the store can be accessed through Google Maps at: Jr. Paruro 1349, Lima 15003.
In this stage, I analyzed the program used to control the OLED display and the RGB LED module with the XIAO ESP32-S3. By reviewing the code, I was able to understand how the display is initialized and updated, as well as how the RGB LED receives signals to generate different colors.
The structure of the code allowed me to clearly identify how both output devices are managed at the same time, including the functions used to display information
In this stage, I analyzed the program used to control the OLED display, the RGB LED module, and the servo motor using the XIAO ESP32-S3 with RemoteXY over a WiFi connection. By reviewing the code, I understood how the system establishes communication with the RemoteXY cloud server, allowing real- time control from a mobile interface. Additionally, I identified how the OLED display is initialized through I2C communication and continuously updated to show system status, including button state, RGB mode, and time data received from the interface.
The structure of the code also allowed me to understand how multiple output devices are managed simultaneously. The RGB LED is controlled using predefined color states that change each time the button is activated, while the servo motor responds to the same input by switching between positions This helped me verify pin configurations, signal control using PWM, and the synchronization between wireless commands, visual outputs on the OLED, and physical responses from the servo motor. ⚙️📡
Once in the directory, I open the new script files marked in a green box, using the Rhinoceros program.
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
#define REMOTEXY_MODE__WIFI_CLOUD
#include
#include
#include
#include
#include
#include
// RemoteXY connection settings
#define REMOTEXY_WIFI_SSID "WI_FI"
#define REMOTEXY_WIFI_PASSWORD "YOURPASSWORD"
#define REMOTEXY_CLOUD_SERVER "cloud.remotexy.com"
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN "cda5e7167a8af520f36a66c4415034a6"
#define REMOTEXY_ACCESS_PASSWORD "1234"
#pragma pack(push, 1)
uint8_t const PROGMEM RemoteXY_CONF_PROGMEM[] = {
255,3,0,3,0,71,0,19,0,0,0,88,73,65,79,69,83,80,51,50,
74,73,65,78,0,31,1,106,200,1,1,4,0,10,27,11,46,46,48,4,
26,31,79,78,0,31,79,70,70,0,65,33,68,39,39,112,13,8,119,93,
20,77,6,94,26,129,13,151,83,34,64,17,76,97,98,101,108,0 };
struct {
uint8_t pushSwitch_01;
uint8_t editTime_01_hour;
uint8_t editTime_01_minute;
uint8_t led_01_r;
uint8_t led_01_g;
uint8_t led_01_b;
uint8_t connect_flag;
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// OLED CONFIG //
/////////////////////////////////////////////
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_ADDR 0x3C
#define SDA_PIN D4
#define SCL_PIN D5
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
/////////////////////////////////////////////
// PIN //
/////////////////////////////////////////////
#define PIN_R D3
#define PIN_G D2
#define PIN_B D1
#define PIN_SERVO D7
Servo miServo;
/////////////////////////////////////////////
// SETUP //
/////////////////////////////////////////////
void setup()
{
RemoteXY_Init ();
// RGB
pinMode(PIN_R, OUTPUT);
pinMode(PIN_G, OUTPUT);
pinMode(PIN_B, OUTPUT);
// Servo
miServo.attach(PIN_SERVO);
// OLED
Wire.begin(SDA_PIN, SCL_PIN);
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.println("Sistema iniciado");
display.display();
}
/////////////////////////////////////////////
// LOOP //
/////////////////////////////////////////////
void loop()
{
RemoteXY_Handler ();
// ====== NEW LOGIC RGB ======
static uint8_t lastState = 0;
static int colorIndex = 0;
// Detectar cambio OFF -> ON
if (RemoteXY.pushSwitch_01 == 1 && lastState == 0) {
colorIndex++;
if (colorIndex > 5) colorIndex = 0;
}
lastState = RemoteXY.pushSwitch_01;
// CONTROL RGB
if (RemoteXY.pushSwitch_01 == 1) {
switch (colorIndex) {
case 0: // RED
analogWrite(PIN_R, 255);
analogWrite(PIN_G, 0);
analogWrite(PIN_B, 0);
break;
case 1: // GREEN
analogWrite(PIN_R, 0);
analogWrite(PIN_G, 255);
analogWrite(PIN_B, 0);
break;
case 2: // BLUE
analogWrite(PIN_R, 0);
analogWrite(PIN_G, 0);
analogWrite(PIN_B, 255);
break;
case 3: // YELLOW
analogWrite(PIN_R, 255);
analogWrite(PIN_G, 255);
analogWrite(PIN_B, 0);
break;
case 4: // Morado
analogWrite(PIN_R, 255);
analogWrite(PIN_G, 0);
analogWrite(PIN_B, 255);
break;
case 5: // Cyan
analogWrite(PIN_R, 0);
analogWrite(PIN_G, 255);
analogWrite(PIN_B, 255);
break;
}
} else {
// turn off RGB
analogWrite(PIN_R, 0);
analogWrite(PIN_G, 0);
analogWrite(PIN_B, 0);
}
// 🎮 CONTROL SERVO
if (RemoteXY.pushSwitch_01 == 1) {
miServo.write(90);
} else {
miServo.write(0);
}
// 🖥️ OLED
display.clearDisplay();
display.setCursor(0,0);
display.println("WEEK11 JIAN");
display.setCursor(0,15);
display.print("BUTTON: ");
display.println(RemoteXY.pushSwitch_01 ? "ON" : "OFF");
display.setCursor(0,30);
display.print("RGB:");
display.print(colorIndex);
display.println("");
display.setCursor(0,45);
display.print("Hora: ");
display.print(RemoteXY.editTime_01_hour);
display.print(":");
display.println(RemoteXY.editTime_01_minute);
display.display();
RemoteXY_delay(100);
}
#include <WiFi.h>
#include <RemoteXY.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <ESP32Servo.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define PIN_R D3
#define PIN_G D2
#define PIN_B D1
#define PIN_SERVO D7
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
Servo miServo;
- WiFi & RemoteXY: Enable wireless communication and remote control. 🌐
- Wire: Enables I2C communication for the OLED.
- Adafruit_SSD1306: Controls the OLED display.
- ESP32Servo: Controls the servo motor using PWM.
- RGB Pins: Define outputs for color control.
void setup()
{
RemoteXY_Init();
pinMode(PIN_R, OUTPUT);
pinMode(PIN_G, OUTPUT);
pinMode(PIN_B, OUTPUT);
miServo.attach(PIN_SERVO);
Wire.begin(D4, D5);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0,0);
display.println("Sistema iniciado");
display.display();
}
- Initializes RemoteXY connection via WiFi.
- Configures RGB pins and attaches the servo motor.
- Initializes OLED display using I2C communication.
- Displays initial system status.
RemoteXY_Handler();
if (RemoteXY.pushSwitch_01 == 1) {
miServo.write(90);
} else {
miServo.write(0);
}
- Receives commands from RemoteXY interface.
- Controls servo position based on button state.
if (RemoteXY.pushSwitch_01 == 1) {
analogWrite(PIN_R, 255);
analogWrite(PIN_G, 0);
analogWrite(PIN_B, 0);
} else {
analogWrite(PIN_R, 0);
analogWrite(PIN_G, 0);
analogWrite(PIN_B, 0);
}
- Controls RGB LED using PWM signals.
- Activates colors when the button is ON and turns off when OFF. 🌈
display.clearDisplay();
display.setCursor(0,0);
display.println("WEEK11 JIAN");
display.setCursor(0,15);
display.print("BUTTON: ");
display.println(RemoteXY.pushSwitch_01 ? "ON" : "OFF");
display.display();
- Updates OLED screen with real-time system status.
- Displays button state received from RemoteXY. 🖥️
RemoteXY_delay(100);
- Maintains stable communication with RemoteXY.
- Ensures smooth synchronization between devices.
Control an RGB LED module and a servo motor through a wireless interface using RemoteXY, while displaying real-time system information on an OLED screen. This demonstrates the integration of wireless communication with both visual and mechanical outputs in an embedded system. ⚙️📡
The OLED display (SSD1306) is a compact output device that uses I2C communication (SDA and SCL), making it easy to integrate with the XIAO ESP32 S3. It offers low power consumption and high contrast since each pixel emits its own light. In my project, it serves as a user interface to display real-time information such as system status, servo position, or messages like “Ready” or “Dispensing,” improving interaction and making the system more intuitive and functional. 📟⚙️
In this step, I created a simple sketch to represent the connection between the XIAO ESP32 S3 and the SG90 servo motor. Based on the diagram, I defined the main wiring by connecting VCC to 5V and GND to GND, ensuring proper power supply to the servo.
For signal control, I assigned the signal pin of the servo to a GPIO pin on the microcontroller, which allows sending PWM signals to control its position. In the sketch, these connections are represented as control lines, helping to clearly understand how the ESP32 S3 sends commands to move the servo to specific angles.
In this stage, I tested the circuit directly on the fabricated PCB using the XIAO ESP32 S3 as the main microcontroller. After assembling the components, including the OLED display and the SG90 servo motor, I powered the board and uploaded the program.
I verified the correct operation of the output devices by observing the information displayed on the OLED and the movement of the servo motor. This allowed me to confirm that the connections, control signals, and overall system performance were working properly, ensuring proper synchronization between visual and mechanical outputs. ⚙️📟
During this assignment, one of the main difficulties I faced was configuring the communication between the XIAO ESP32 S3 and the OLED display, as sometimes the screen did not respond correctly due to I2C address or wiring issues. Additionally, I had to ensure proper power supply for the SG90 servo motor, since unstable voltage could affect its performance.
Another challenge was synchronizing both output devices in the code, making sure that the servo movement and the OLED updates worked smoothly without conflicts or delays. However, through testing and adjustments, I was able to solve these issues and achieve a stable and functional system. ⚙️💻📟
During the group work, one of the main challenges was coordinating the use of the CNC machine and organizing the workflow among team members. Since several people needed to use the equipment, we had to carefully plan the machining times and preparation steps to avoid delays.
Another challenge was ensuring that everyone correctly understood the CNC preparation process, including setting the X, Y, and Z axes, fixing the material properly on the machine bed, and verifying the toolpaths before starting the cutting process. Small mistakes in these steps could affect the machining results.
Through collaboration and discussion, we were able to solve these issues by helping each other review the machine setup, checking the files before cutting, and sharing our observations during the fabrication process. This teamwork helped us achieve more accurate and safer results when using the CNC router. ⚙️🪵
As a team, we learned how to safely test an electronic board before measuring signals by first checking the power connections and possible short circuits using a multimeter. After confirming that the board was working correctly, we used the oscilloscope to analyze the signal generated by the Raspberry Pi Pico, connecting the probe ground to GND and the tip to the corresponding GPIO pin.
We also learned how oscilloscope settings such as VOLTS/DIV, TIME/DIV, and the trigger configuration affect signal visualization. Through troubleshooting issues like incorrect pin selection or unstable trigger settings, we were able to obtain a clear and stable signal and understand the difference between a multimeter reading and an oscilloscope waveform.
Here are the project files available for download: