Project 1 – Wi-Fi Weather Station
Updated: Sep 12
What You'll Need
ESP32 Development Board
DHT22 (or DHT11) Temperature & Humidity Sensor
Jumper wires
Breadboard
What It Does
This project reads temperature and humidity from a DHT sensor. It displays the values in the Arduino Serial Monitor. From here, you can easily expand the project by uploading the data to Home Assistant, MQTT, Blynk, or a cloud dashboard.
Wiring
DHT22 | ESP32 |
VCC | 3.3V |
GND | GND |
DATA | GPIO4 |
Arduino Code
```cpp
include <DHT.h>
define DHTPIN 4
define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(115200);
dht.begin();
}
void loop() {
delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature();
Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(t);
Serial.println(" *C");
}
```
Possible Upgrades
Send readings to MQTT
Build a web dashboard
Display values on an OLED
Log data to an SD card
Project 2 – Control an LED Using Your Phone
One of the biggest advantages of the ESP32 is its built-in Wi-Fi. Instead of pressing a physical button, you can control hardware from any device on your local network.
Components
ESP32
LED
220Ω resistor
Wiring
LED | ESP32 |
Positive | GPIO2 |
Negative | GND (through resistor) |
Arduino Code
```cpp
include <WiFi.h>
const char* ssid = "your_SSID";
const char* password = "your_PASSWORD";
WiFiServer server(80);
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
server.begin();
Serial.println("Server started");
}
void loop() {
WiFiClient client = server.available();
if (client) {
String request = client.readStringUntil('\r');
client.flush();
if (request.indexOf("/LED=ON") != -1) {
digitalWrite(2, HIGH);
} else if (request.indexOf("/LED=OFF") != -1) {
digitalWrite(2, LOW);
}
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();
client.println("<!DOCTYPE HTML>");
client.println("<html>");
client.println("<a href=\"/LED=ON\">Turn On</a><br>");
client.println("<a href=\"/LED=OFF\">Turn Off</a><br>");
client.println("</html>");
client.stop();
}
}
```
What You'll Learn
Connecting an ESP32 to Wi-Fi
Running a simple web server
GPIO output control
Basic IoT concepts
Project 3 – Bluetooth Serial Terminal
The ESP32 includes Bluetooth Classic and BLE. This allows wireless communication with phones, tablets, and computers. In this project, your phone becomes a wireless serial terminal.
Components
ESP32
Android phone with a Bluetooth Terminal app
Arduino Code
```cpp
include <BluetoothSerial.h>
BluetoothSerial SerialBT;
void setup() {
Serial.begin(115200);
SerialBT.begin("ESP32"); // Name of the Bluetooth device
}
void loop() {
if (SerialBT.available()) {
String command = SerialBT.readString();
Serial.println(command);
}
}
```
What You'll Learn
Bluetooth communication
Wireless debugging
Serial data transfer
Mobile integration
Why Choose an ESP32?
Compared to traditional Arduino Uno boards, the ESP32 offers significantly more processing power and built-in wireless connectivity. Some of its key features include:
Dual-core processor running at up to 240 MHz
Integrated Wi-Fi
Bluetooth Classic and BLE
More than 30 GPIO pins
ADC, DAC, SPI, I²C, UART, and PWM support
Compatible with Arduino IDE and ESP-IDF
These capabilities make it suitable for smart home automation, robotics, wireless sensors, industrial monitoring, and Internet of Things (IoT) applications.
Getting Started
Programming the board is straightforward:
Install the Arduino IDE.
Add the ESP32 Board Manager package.
Install the CH340 USB driver if required.
Connect the board using a USB-C data cable.
Select the correct COM port.
Upload your sketch.
If your computer doesn't detect the board, ensure you're using a USB cable that supports both data and charging. Some USB-C cables are power-only.
Ready to Start Building?
Whether you're creating smart home devices, learning embedded programming, or developing commercial IoT products, the ESP32 Development Board with CH340C USB-C provides an affordable and powerful platform to bring your ideas to life.
Explore the product here: ESP32 Development Board with CH340C USB-C.
At only R110, it's one of the best-value development boards available for anyone looking to dive into the world of embedded systems, wireless communication, and IoT development.



Comments