Skip to content

uugan/esp32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ESP32 LoRa Temperature & Humidity System

This project consists of two ESP32-based nodes communicating via LoRa. The client node reads temperature and humidity from a sensor, sends it every 5 seconds to the server node, and listens for commands (relay_on, relay_off). The server node connects to WiFi & Blynk, forwards data to Blynk, and relays control commands back to the client node.


πŸ“‹ Features

βœ… Client node:

  • Reads temperature & humidity
  • Sends data over LoRa every 5 seconds
  • Receives relay control commands (relay_on, relay_off) over LoRa

βœ… Server node:

  • Connects to WiFi & Blynk cloud
  • Receives data from client over LoRa
  • Sends data to Blynk every 15 minutes
  • Receives commands from Blynk and forwards them to client over LoRa

Blynk Dashboard

πŸ›  Hardware

  • 2 Γ— ESP32 Dev Boards
  • 2 Γ— LoRa SX1278 modules
  • 1 Γ— DHT11 or similar temperature & humidity sensor
  • 1 Γ— Relay module
  • Jumper wires, breadboard or PCB

ESP32 with LoRa module

ESP32 with LoRa module

πŸ“ File Structure

.
β”œβ”€β”€ lora_client/lora_client.ino         # LoRa client (sensor) code
β”œβ”€β”€ lora_server/lora_server.ino         # LoRa server (WiFi & Blynk) code
β”œβ”€β”€ lora_server/secret.h            # WiFi & Blynk credentials (not tracked in git)
β”œβ”€β”€ .gitignore          # ignores secret.h and build artifacts
β”œβ”€β”€ README.md           # this file
β”œβ”€β”€ LICENSE             # license file

πŸ”’ Secrets

Create a secret.h file in the lora server project folder (excluded from git) with:

#define BLYNK_TEMPLATE_ID "YourTemplateId"
#define BLYNK_TEMPLATE_NAME "YourBlynkTemplateName"
#define BLYNK_AUTH_TOKEN "YourBlynkToken"

#define WIFI_SSID     "YourWifiSSID"
#define WIFI_PASSWORD "YourWifiPassword"

πŸš€ Getting Started

On the client node:

Flash client.ino to ESP32 #1.
Connect LoRa module & sensor.
Power it on.

On the server node:

Flash server.ino to ESP32 #2.
Connect LoRa module.
Make sure secret.h is configured with your WiFi & Blynk credentials.

Power it on.

On Blynk:

Create a new project.
Add widgets for temperature, humidity, and buttons to control relay.
Use the auth token in secret.h.

πŸ“– License MIT License Β© uugan

About

ESP32 LoRa Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages