Installation & Device Setup
Complete guide for setting up and configuring your ESP32 LoRaWAN water quality monitoring devices.
Prerequisites
Hardware Requirements
Arduino IDE Setup for ESP32
1. Add ESP32 Board Manager
• Open Arduino IDE → File → Preferences
• In "Additional Board Manager URLs" add:
https://dl.espressif.com/dl/package_esp32_index.json2. Install ESP32 Boards
• Go to Tools → Board → Boards Manager
• Search for "ESP32" and install "ESP32 by Espressif Systems"
• Wait for installation to complete
3. Install Required Libraries
Go to Tools → Manage Libraries and install the following:
4. Configure LMIC Library for Region
⚠️ Important: Region Configuration Required
BEFORE uploading code, you must configure the LMIC library for your LoRaWAN frequency region.
📍 For India Region (IN866):
- Navigate to:
My Documents > Arduino > libraries > MCCI_LoRaWAN_LMIC_library > project_config - Open
lmic_project_config.husing Notepad or any text editor - Find the line:
#define CFG_us915 1 - Comment it out by adding
//at the beginning:// #define CFG_us915 1 - Find the line:
// #define CFG_in866 1 - Uncomment it by removing
//:#define CFG_in866 1 - Save and close the file
Other Regions:
CFG_eu868 or CFG_in866CFG_us915CFG_as923CFG_au915Only ONE region should be enabled at a time. Make sure all other regions are commented out.
Board Configuration
Before uploading code, configure Arduino IDE settings for your ESP32:
Installation Complete!
Your development environment is now ready.
Next, review the circuit diagram to understand hardware connections, then use the code generator to create your custom Arduino sketch.