Week 11. Embedded Networking and Communications¶
Hero Shot
Assignments for the Week¶
Group Assignment:
- Send a message between two projects.
Link to the group Assignment is here
key takeaways from this week
-
It was really delightful to communicate with two different boards with different medium of communication protocols available.
-
While doing the UART connection between the board and the DF player mini, it is very important to keep in mind to connect the (RX) pin of DFplayer mini to the (TX) pin of board and (TX) pin of Df player mini to (RX) pin of board.
-
I really enjoyed using the blynk app to put ON and OFF the LED and in addition to that we can even perform multiple functions like playing MP3, controlling motors etc.
-
While making connection with the components using bread board, we need to check the continuity of jumper wires because in some cases I found that some of the jumper wires are not working which consumed my time unnecessarily debugging the issue..
Individual Assignment:
- Design, build, and connect wired or wireless nodes with network or bus addresses and local input or output devices.
For this embedded networking and communication week, I used my own micro controller board which I had made during electronics design week for which the link is given here
Since this week being the networking and communication, I tried to communicate between Xiao RP2040 and Xiao ESP32C3. I kept the Xiao Rp2040 as the controller board and Xiao ESP32C3 as a peripheral board. After that I connected the external LED to one of the pin in Xiao ESP32C3 and run the command “LED ON” and “LED OFF” in serial monitor of Xiao RP2040 and observed that the LED is blinking on and off.
This was the mistake which I had made while uploading the code as I had selected the wrong port so the code was not uploading. Next I selected the right port, then only my code got uploaded.
Next I tried to explore the Blynk app and put ON and OFF the LED through my mobile and so for that firstly I downloaded the blynk app in my mobile phone.
After that I tried opening the blynk app from my computer too by signing up and creating the user account and I had referred to this tutorial for setting up the blynk app.
Steps to create the New Template
I typed the blynk app in my computer and clicked on it to open the app
I created the new template after opening the blynk app page
Next I had given the project name, selected the board, selected the mode of connection and clicked on Done
.
Followed by that, I clicked on the new datastream and selected the virtual pin
After that I kept the name as LED, selected the pin as V0, selected the data type to integer and clicked on create
Then next I clicked on the web dashboard and dragged the symbol of switch in the dashboard and set the datastream by clicking on V0 and then clicked on save option
Next I clicked on the mobile dashboard and clicked on save option
I then clicked on the device, added new device from the template
After that I had selected my project name and clicked on create
Next I opened the blynk app in my phone and carried out some of the steps mentioned below so that I can control Led from my phone;
Followed by that I went for setting up my layout and for that I had connected the external Led to D2 pin of Xiao RP2040 by defining all the necessary credentials that are required for connecting blynk app.
Attached below is the code which I used for blinking LED with blynk app.
#define BLYNK_TEMPLATE_ID "TMPL6Ut4YoCeb"
#define BLYNK_TEMPLATE_NAME "first project"
#define BLYNK_AUTH_TOKEN "MBqioQihYa3qHcc5PE-et2cR06yGbrby"
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
// Replace with your WiFi credentials
char ssid[] = "redmi";
char pass[] = "Jnwsfl@2025";
// LED pin (D2 on ESP32-C3 is GPIO 4)
const int ledPin = 4;
// Called when the Blynk app writes to Virtual Pin V0
BLYNK_WRITE(V0) {
int ledState = param.asInt(); // Get value from app
digitalWrite(ledPin, ledState);
}
void setup() {
// Start serial for debug
Serial.begin(115200);
// Set LED pin as output
pinMode(ledPin, OUTPUT);
// Connect to WiFi and Blynk
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
}
void loop() {
// Run Blynk tasks
Blynk.run();
}
In the above code, those were the areas where I had entered some of the credentials for using blynk app
Files for the week:
It was really nice in learning embedded programing and especially while using Blynk app I was really interested in exploring many new things.