1. PCB Board - ESP32 MPC
2. Sensors - Ultrasonic Sensor
3. WS2812 - RGB LED
A network is a collection of devices (also known as nodes) linked through communication links. On the other hand, a network is two or more computers joined together.
A data network, often known as a computer network, is a communication system that allows devices to exchange data. A computer network, often known as a data network, is a telecommunications system that will enable computers to connect. Data communications refer to the exchange of digital data among two or more computer systems. The cable and wireless media establish physical connectivity between networked computing systems. The most well-known computer network is the internet.
The term "Wired" refers to any physical medium connected via wires and cables. The cables or wires can be fiber optic, copper wire, or twisted pair. Additionally, they offer high security and generous bandwidth allocations for each user. Therefore, it is a suitable option for a specific section of users. Contrary to wireless connectivity, wired connectivity is quite reliable and has very little delay. This is a key difference between wired and wireless connections.
The term "wireless" refers to the transmission of electromagnetic or infrared waves across the air. Additionally, there are antennas to communicate. Users' freedom of movement and ease of deployment are two main advantages of wireless networking. Thus, wireless is a better choice in locations where you cannot deploy wires. In the wired vs wireless network selection process, wireless also offers lower installation costs. However, it is less secure and has a larger latency than cable connectivity. However, users still like wireless communication.
The ideal choice for your firm depends on its particular needs. Additionally, you should consider the kind of data it will handle. There are also several legislative constraints relevant to its line of business. Some businesses may also decide on a hybrid strategy. In this strategy, they largely maintain a wired network while also deploying a wireless network. Thus, they get mobility to a limited user segment.
Furthermore, it is essential to get network installation correctly the first time. Therefore, contact IT specialists who can point you on the proper path if you are unsure of which alternative is best for your company. This will also prevent problems later on when your organization expands.
An Ethernet connection uses cables to transmit data. Therefore, it is an example of a wired network. But a WiFi connection sends information using wireless waves. Choosing between a WiFi connection and an Ethernet connection is a common challenge. Thus, clearing doubts is a must when deciding on the best connectivity alternatives.
-> When compared to an Ethernet connection, a WiFi connection sends data over wireless waves.
-> WiFi connections don't require cords, giving users more freedom to move around a location while connecting to a network or the Internet. Thus, users must connect a device with an Ethernet cable to use an Ethernet connection to access a network.
-> A WiFi connection is slower than an Ethernet connection, which also offers higher stability and security. This is a crucial point for ethernet cable vs wifi.
Bluetooth Low Energy, BLE for short, is a power-conserving variant of Bluetooth. BLE’s primary application is short distance transmission of small amounts of data (low bandwidth). Unlike Bluetooth that is always on, BLE remains in sleep mode constantly except for when a connection is initiated.
This makes it consume very low power. BLE consumes approximately 100x less power than Bluetooth (depending on the use case). Additionally, BLE supports not only point-to-point communication, but also broadcast mode, and mesh network.
With Bluetooth Low Energy, there are two types of devices: the server and the client. The ESP32 can act either as a client or as a server.
The server advertises its existence, so it can be found by other devices, and contains the data that the client can read. The client scans the nearby devices, and when it finds the server it is looking for, it establishes a connection and listens for incoming data. This is called point-to-point communication.
Each service, characteristic and descriptor have an UUID (Universally Unique Identifier). An UUID is a unique 128-bit (16 bytes) number. For example: 55072829-bc9e-4c53-938a-74a6d4c78776
There are shortened UUIDs for all types, services, and profiles specified in the SIG (Bluetooth Special Interest Group). But if any application needs its own UUID,then it can be generated by using UUID generator website. In general, the UUID is used to uniquely identify information. For example, it can identify a particular service provided by a Bluetooth device.
Reference Link
Online UUID Generator LinkThe ESP32 with BLE on the Arduino IDE, we can create an ESP32 BLE server, and then an ESP32 BLE scanner to find that server.
For creating a BLE server, the code should follow the next steps:
For creating a BLE client, the code should follow the next steps:
This ESP32 project allows a user to control an RGB WS2812 LED through a web interface while also displaying the distance detected by an ultrasonic sensor. The communication between the ESP32 and the browser is handled using WebSockets.
Objective
-> Establish a wireless node using ESP32 with a unique network address.
-> Integrate local input devices (Ultrasonic Sensor & Web Buttons).
-> Implement local output devices (WS2812 RGB LED & Web UI).
-> Use WebSockets for real-time, bi-directional communication.
-> Display distance measurements and control LED colors via a web-based interface.
-> Implement UI enhancements with a dark theme, larger buttons, and a real-time clock.
Wi-Fi Initialization
-> The ESP32 tries to connect to the Wi-Fi network.
-> The loop waits until the connection is established.
-> Once connected, the IP address of the ESP32 is printed, which is required to access the web interface.
Why WiFi?
-> I have used Wi-Fi for a wireless user interface.
-> ESP32 acts as a WebSocket server to send & receive data instantly.
WebSocket vs WebServer(HTTP) Comparison
Feature | WebSocket | WebServer (HTTP) |
---|---|---|
Communication Type | Full-duplex(bi-directional, real-time) | Half-duplex (request-response model) |
Connection | Persistent connection | New connection for each request |
Latency | Low latency (real-time communication) | Higher latency due to connection overhead |
Efficiency | Uses a single TCP connection | Multiple TCP connections for each request |
Best For | Real-time apps (chat, gaming, IoT) | Static web pages, REST API calls |
Data Format | Can send binary and text data efficiently | Typically JSON, XML, or HTML |
Overhead | Lower after initial handshake | Higher due to frequent handshakes |
Security | Can use WSS (WebSocket Secure) | Uses HTTPS for encrypted communication |
Browser Support | Supported in modern browsers | Fully supported in all browsers |
Scalability | Complex due to persistent connections | Easier to scale with stateless requests |
Implementation Complexity | Requires WebSocket server & client | Simple with standard HTTP servers |
Why Websocket?
For real-time, two-way communication with an ESP32, WebSockets are generally preferred over traditional HTTP web servers because they offer persistent, low-latency connections, enabling efficient data exchange without constant polling.
Network or Bus
-> The ESP32 has a unique network address (IP address) assigned by the router.
-> The ESP32 gets an IP address upon connecting to WiFi.
-> The WebSocket protocol uses the ESP32’s IP address and port 81 for real-time communication.
-> The ESP32 assigns WebSocket client numbers (num parameter) to track multiple browser connections.
Local Input & Output Devices
Input Devices
-> Ultrasonic Sensor (HC-SR04): Measures distance and detects objects.
-> Web Buttons: Send commands (Red, Green, Blue) to control the LED.
Output Devices
-> WS2812 RGB LED: Changes color based on button presses.
-> Web UI Display: Shows distance measurement & status.
WS2812
WS2812 is a intelligent control LED light source that the control circuit and RGB chip are integrated in a package of 5050 components. It internal include intelligent digital port data latch and signal reshaping amplif ication drive circuit. Also include a precision internal oscillator and a 12V voltage programmable constant curre -nt control part, effectively ensuring the pixel point light color height consistent.
The data transfer protocol use single NZR communication mode. After the pixel power-on reset, the DIN port receive data from controller, the first pixel collect initial 24bit data then sent to the internal data latch, the other data which reshaping by the internal signal reshaping amplification circuit sent to the next cascade pixel through the DO port. After transmission for each pixel, the signal to reduce 24bit. pixel adopt auto resha -ping transmit technology, making the pixel cascade number is not limited the signal transmission, only depend on the speed of signal transmission.
LED with low driving voltage, environmental protection and energy saving, high brightness, scattering angl e is large, good consistency, low power, long life and other advantages. The control chip integrated in LED above becoming more simple circuit, small volume, convenient installation
PIN Configuration
Reference Link
WS2812 Ultrasonic SensorConnections
This project demonstrates how to establish a WiFi-connected wireless node with real-time WebSocket communication, integrating sensor inputs and RGB LED outputs controlled from a web browser. The system effectively meets the assignment requirements by implementing network addressing, local I/O devices, and wireless communication.
VN Editor is a professional-grade, free video editing app used for editing short videos, tutorials, vlogs, and presentations. It offers a user-friendly interface with powerful tools suitable for both beginners and advanced users.
Can VN Editor Edit Images?
While VN Editor is primarily a video editing tool, we can use it to create slideshows or static image-based videos with effects. It does not offer traditional image editing tools like cropping, retouching, or color correction specific to still images alone.
However, we can perform the following on images within a video project:
-> Add Filters and Effects to still images
-> Overlay Text on images
-> Add Motion (Ken Burns effect) to create a zoom/pan animation
-> Adjust Image Duration within the timeline
-> Insert Transitions between images
-> Export the sequence as a video
Video Editing Using VN Editor
I used VN Editor to edit the above video for this assignment. Below are the steps followed:
Steps for Editing Video
Why VN Editor Was Chosen?
-> Free and watermark-free even in the free version
-> Easy to use on mobile
-> High-quality export options
-> Rich library of transitions, fonts, effects, and music
-> Perfect for quick edits and professional-looking output