Online Configuration Guide

Complete guide to configuring the IoT-enabled smart farming system

Master IoT connectivity, cloud services, and remote monitoring

Step 1: IoT Setup Type Selection

BASIC_ONLINE

Minimal IoT setup with WiFi and basic web interface

Features:
WiFi connectivity
Basic web interface
No cloud services
Local monitoring only

STANDARD_ONLINE

Standard setup with DHT22, LCD, and ThingSpeak logging

Features:
All standard features
ThingSpeak cloud logging
Web interface
Basic IoT monitoring

IOT_MONITORING

Complete IoT setup with dual cloud services

Features:
ThingSpeak + Adafruit IO
Advanced monitoring
Remote control
Professional IoT setup

POTENTIOMETER_IOT

IoT setup with potentiometer control and monitoring

Features:
Real-time threshold control
Full IoT monitoring
ThingSpeak logging
Professional control

PROFESSIONAL_IOT

Complete professional setup with all IoT features

Features:
All sensors and controls
Dual cloud services
LCD 2004 display
Enterprise monitoring

CUSTOM_ONLINE

Full manual configuration for advanced IoT users

Features:
Complete IoT control
Manual service selection
Custom configurations
Advanced IoT setup

Step 2: WiFi & Network Configuration

WiFi Connection Settings

WIFI_SSID "YOUR_WIFI_SSID"

Your WiFi network SSID (name)

WIFI_PASSWORD "YOUR_WIFI_PASSWORD"

Your WiFi network password

WIFI_TIMEOUT 10000ms

Maximum time to wait for WiFi connection

Access Point Fallback

AP_MODE_ENABLED true

Creates local WiFi when internet fails

AP_SSID "SmartFarming-ESP32"

Local access point network name

AP_PASSWORD "smartfarm123"

Access point password (min 8 chars)

Step 3: IoT Services Configuration

Master IoT Control

IOT_SERVICES_ENABLED true

Master switch for all cloud services

WEB_UI_ONLY_MODE false

Use only built-in web interface, no cloud

Individual Services

THINGSPEAK_ENABLED true

Enable ThingSpeak cloud data logging

ADAFRUIT_IO_ENABLED false

Enable Adafruit IO dashboards

Cloud Service Credentials

ThingSpeak Setup

THINGSPEAK_API_KEY "YOUR_API_KEY"
THINGSPEAK_CHANNEL_ID "YOUR_CHANNEL_ID"

Adafruit IO Setup

ADAFRUIT_IO_USERNAME "YOUR_USERNAME"
ADAFRUIT_IO_KEY "YOUR_API_KEY"

Web Interface Configuration

Web Server Settings

WEB_SERVER_PORT 80
ENABLE_WEB_AUTH true

Default Credentials

WEB_USERNAME "admin"
WEB_PASSWORD "smartfarm123"

OTA Updates

OTA_HOSTNAME "smart-farming-esp32"
OTA_PASSWORD "your_ota_password"

Sensor Configuration

Sensor Calibration

Soil Moisture Sensor

Calibrate by testing in dry air and water:
Dry Value: 4095
SOIL_MOISTURE_DRY_VALUE
Wet Value: 0
SOIL_MOISTURE_WET_VALUE

LDR Sensor Calibration

Calibrate for light detection:
Dark Value: 4095
LDR_DARK_VALUE
Bright Value: 0
LDR_BRIGHT_VALUE

Sensor Validation

Temperature Validation

Valid temperature range:
Min: -10.0°C
MIN_TEMPERATURE
Max: 60.0°C
MAX_TEMPERATURE

Humidity Validation

Valid humidity range:
Min: 0.0%
MIN_HUMIDITY
Max: 100.0%
MAX_HUMIDITY

Advanced Configuration

Data Transmission

DATA_TRANSMISSION_INTERVAL 300000ms

5 minutes between cloud updates

MAX_TRANSMISSION_RETRIES 3

Retry failed transmissions

Memory Management

LOG_BUFFER_SIZE 50

Readings stored in memory

MEMORY_CHECK_INTERVAL 300000ms

Monitor available memory

Network Settings

HTTP_TIMEOUT 10000ms

Cloud service request timeout

DNS_TIMEOUT 5000ms

DNS resolution timeout

Complete Configuration Examples

Web UI Only Mode

// Local operation with web interface
#define IOT_SERVICES_ENABLED false
#define WEB_UI_ONLY_MODE true
#define THINGSPEAK_ENABLED false
#define ADAFRUIT_IO_ENABLED false

Full IoT Mode

// Complete IoT with dual cloud services
#define IOT_SERVICES_ENABLED true
#define WEB_UI_ONLY_MODE false
#define THINGSPEAK_ENABLED true
#define ADAFRUIT_IO_ENABLED true