By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
Viral Trending contentViral Trending content
  • Home
  • World News
  • Politics
  • Sports
  • Celebrity
  • Business
  • Crypto
  • Gaming News
  • Tech News
  • Travel
Reading: ESP32 Soil Moisture Sensor: Real-Time Monitoring & Visualization
Notification Show More
Viral Trending contentViral Trending content
  • Home
  • Categories
    • World News
    • Politics
    • Sports
    • Celebrity
    • Business
    • Crypto
    • Tech News
    • Gaming News
    • Travel
  • Bookmarks
© 2024 All Rights reserved | Powered by Viraltrendingcontent
Viral Trending content > Blog > Gaming News > ESP32 Soil Moisture Sensor: Real-Time Monitoring & Visualization
Gaming News

ESP32 Soil Moisture Sensor: Real-Time Monitoring & Visualization

By Viral Trending Content 8 Min Read
Share
SHARE

By Adrelien
in
ESP32
—
Sep 27, 2025

Contents
Hardware RequirementsSoftware RequirementsStep 1: Setting Up Your Development EnvironmentInstalling ESP32 Board SupportInstalling Required LibrariesStep 2: Wiring the 2-Prong Soil Sensor to ESP32Step 3: Setting Up Telemetry HarborCreate an Account:Create a New Harbor:Generate an API Key:Step 4: Uploading and Testing the CodeGetting the Code:Configure the Code:Select the Correct Board:Upload the Code:Verify Operation:Step 5: Visualizing Data with Telemetry HarborAccess Grafana Credentials:Login to Grafana:Navigate to Dashboards:Configure Your Dashboard View:Harbor AI: Your Smart Garden AssistantExample Conversation with Harbor AI:Harbor AI Can Help You:Conclusion

The ESP32 is a powerful microcontroller with built-in Wi-Fi, making it an excellent choice for IoT projects. In this guide, we will walk you through how to collect soil moisture data from a 2-prong soil sensor, send it to the cloud using Telemetry Harbor, and visualize it using a Grafana dashboard

ESP32 Soil Moisture Sensor: Real-Time Monitoring & Visualization

The ESP32 is a powerful microcontroller with built-in Wi-Fi, making it an excellent choice for IoT projects. In this guide, we will walk you through how to collect soil moisture data from a 2-prong soil sensor, send it to the cloud using Telemetry Harbor, and visualize it using a Grafana dashboard. Let’s dive in!

Hardware Requirements

Software Requirements

  • Arduino IDE (1.8.13 or newer)
  • Required libraries:
    • Telemetry Harbor SDK
    • WiFi Library (built into ESP32 core)
    • HTTPClient Library (built into ESP32 core)
  • Telemetry Harbor account (free tier available)

Step 1: Setting Up Your Development Environment

Installing ESP32 Board Support

  1. Open Arduino IDE
  2. Go to File > Preferences
  3. Add the following URL to the “Additional Boards Manager URLs”:
   https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  1. Go to Tools > Board > Boards Manager
  2. Search for “ESP32” and install the ESP32 by Espressif Systems

Installing Required Libraries

  1. Go to Sketch > Include Library > Manage Libraries
  2. Search for and install:

Step 2: Wiring the 2-Prong Soil Sensor to ESP32

The 2-prong soil sensor uses analog output, which requires just three connections:

Soil Sensor PIN ESP32 PIN FUNCTION
VCC 3.3V Power
GND GND Ground
A0 Analog GPIO 34 Analog Data

Step 3: Setting Up Telemetry Harbor

Telemetry Harbor provides a straightforward platform for collecting, storing, and visualizing IoT sensor data. Follow these steps to set up your account:

Create an Account:

Visit Telemetry Harbor and sign up for a new account.

Create a New Harbor:

  1. From your dashboard, click Create New Harbor
  2. Name it something descriptive like “ESP32_Soil_Monitor”
  3. Select the harbor type as General and Specification Free

Generate an API Key:

  1. Navigate to “View Details” for your created harbor
  2. Click “View API Key”
  3. Copy and save your API Key securely – you’ll need it for your ESP32 code
  4. Note your API ENDPOINT from the API Endpoint

Step 4: Uploading and Testing the Code

The complete code for this project is available in our GitHub repository. You can view and download it directly:

Getting the Code:

  1. Visit the Repository: Click the GitHub link above
  2. Find the Main Code File: Look for ESP32_Soil_Sensor_Telemetry_Harbor.ino in the repository
  3. Download Options:
    • Option A: Click the file name, then click “Raw” to view the code directly, then copy-paste into Arduino IDE
    • Option B: Click the green “Code” button and “Download ZIP” to get all project files
    • Option C: Use the direct link: ESP32_Soil_Sensor_Telemetry_Harbor.ino

Configure the Code:

// WiFi credentials
const char* ssid = "YOUR_WIFI_NAME";
const char* password = "YOUR_WIFI_PASSWORD";

// Telemetry Harbor API info
const char* harborEndpoint = "YOUR_API_ENDPOINT";
const char* harborApiKey = "YOUR_API_KEY";
const char* shipId = "Garden 1";

// Sleep interval (5 minutes default)
const int SLEEP_INTERVAL_SEC = 5 * 60;
  1. Replace the WiFi SSID and password with your network credentials
  2. Update the Telemetry Harbor API URL and API key with your account details
  3. Adjust the sensor reading interval if needed (default is 5 minutes)
  4. Customize the shipId to identify your monitoring location

Select the Correct Board:

  1. Go to Tools > Board and select your ESP32 board model
  2. Select the correct COM port under Tools > Port

Upload the Code:

  1. Click the Upload button (→) in Arduino IDE
  2. Wait for the compilation and upload to complete

Verify Operation:

  1. Open the Serial Monitor (Tools > Serial Monitor) set to 115200 baud
  2. Check for successful WiFi connection and sensor initialization
  3. Monitor soil moisture readings and verify data transmission
  4. Confirm data is being sent to Telemetry Harbor

Step 5: Visualizing Data with Telemetry Harbor

Once your ESP32 begins transmitting soil moisture data, you can create powerful visualizations in Telemetry Harbor through its integrated Grafana dashboards:

Access Grafana Credentials:

  1. Go back to the Harbor Details page
  2. Copy the Grafana Password shown on this page
  3. Click on the Grafana Endpoint link provided

Login to Grafana:

  1. Use your Grafana Username (this will be the same as your Telemetry Harbor email)
  2. Enter the Grafana Password you copied earlier

Navigate to Dashboards:

  1. In the left sidebar, click on Dashboards
  2. Select the Comprehensive Telemetry Dashboard (this is the demo dashboard provided by Telemetry Harbor)

Configure Your Dashboard View:

  1. Choose your data source (which will be your harbor)
  2. Use the filters to view data based on ship_id and cargo_id
  3. Select appropriate time ranges to view your soil moisture history
  4. Set up alerts for moisture thresholds (e.g., below 30% = watering needed)

Harbor AI: Your Smart Garden Assistant

One of the most exciting features of Telemetry Harbor is Harbor AI – an intelligent assistant that can analyze your garden data and provide insights in natural language. Harbor AI combines general agricultural knowledge with your specific sensor data to give you personalized gardening advice.

Example Conversation with Harbor AI:

You: “How is my Garden 1 doing?”

Harbor AI: “Let me review the latest key environmental metrics that influence plant health: soil moisture, temperature, humidity, and solar radiation.

Here’s an update on your Garden 1 based on the latest data:

  • Soil Moisture: Steady at around 70%, which is a healthy moisture level for most plants.
  • Temperature, Humidity, Solar Radiation: There are no recent readings available for these metrics in the latest data.

Overall, your garden’s soil moisture looks good, indicating well-watered soil.”

Harbor AI Can Help You:

  • Assess plant health based on multiple sensor readings and horticultural knowledge
  • Identify optimal conditions for your specific plants using correlation analysis
  • Detect problems early through anomaly detection before they become serious
  • Plan ahead with trend analysis and forecasting
  • Make data-driven decisions with aggregated insights from all your sensors

This AI-powered analysis transforms raw sensor data into actionable gardening insights, making it easy for anyone to understand their garden’s needs without being a data expert or plant specialist.

Conclusion

Your ESP32 is now up and running with the 2-prong soil sensor, streaming live soil moisture data to Telemetry Harbor. With this setup, you can monitor your garden’s hydration needs in real time and make data-driven watering decisions.

Want to take it further? Try adding multiple sensors for different garden zones, setting up automated irrigation alerts, or even integrating weather data for smarter watering schedules. The ultra-low power design means your sensors can run for months on a single battery, making this perfect for remote garden monitoring. The possibilities are endless!

You Might Also Like

Cult Hit Doki Doki Literature Club Fights Removal From Google Play Store Over ‘Depiction Of Sensitive Themes’

Dead as Disco Launches Into Early Access on May 5th, Groovy New Gameplay Released

Don’t Starve Elsewhere, A New Addition to Klei’s Survival Franchise, Announced for PC

A new Borderlands game just dropped, and it's free

Metal Gear Solid Film Greenlit By Sony, First Look in the Works

TAGGED: Game Latest, pc, PC Online
Share This Article
Facebook Twitter Copy Link
Previous Article Synology NAS Drops HEVC Support: What It Means for Users
Next Article FTSE 100 shares: are we in for a rough ride?    
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

- Advertisement -
Ad image

Latest News

JPMorgan CEO Jamie Dimon says he’s ‘learned and relearned’ to not make big decisions when he’s tired on Fridays
Business
Apple AI Pin Specs Leak: Dual Cameras, No Screen & More
Tech News
A ‘glass-like’ battlefield: German Army chief on the future of warfare
World News
Polymarket Sees Record $153M Daily Volume After Chainlink Integration
Crypto
Natasha Lyonne Then & Now: See Before & After Photos of the Actress Here
Celebrity
Cult Hit Doki Doki Literature Club Fights Removal From Google Play Store Over ‘Depiction Of Sensitive Themes’
Gaming News
Dead as Disco Launches Into Early Access on May 5th, Groovy New Gameplay Released
Gaming News

About Us

Welcome to Viraltrendingcontent, your go-to source for the latest updates on world news, politics, sports, celebrity, tech, travel, gaming, crypto news, and business news. We are dedicated to providing you with accurate, timely, and engaging content from around the globe.

Quick Links

  • Home
  • World News
  • Politics
  • Celebrity
  • Business
  • Home
  • World News
  • Politics
  • Sports
  • Celebrity
  • Business
  • Crypto
  • Gaming News
  • Tech News
  • Travel
  • Sports
  • Crypto
  • Tech News
  • Gaming News
  • Travel

Trending News

cageside seats

Unlocking the Ultimate WWE Experience: Cageside Seats News 2024

Investing £5 a day could help me build a second income of £329 a month!

JPMorgan CEO Jamie Dimon says he’s ‘learned and relearned’ to not make big decisions when he’s tired on Fridays

cageside seats
Unlocking the Ultimate WWE Experience: Cageside Seats News 2024
May 22, 2024
Investing £5 a day could help me build a second income of £329 a month!
March 27, 2024
JPMorgan CEO Jamie Dimon says he’s ‘learned and relearned’ to not make big decisions when he’s tired on Fridays
April 10, 2026
Brussels unveils plans for a European Degree but struggles to explain why
March 27, 2024
© 2024 All Rights reserved | Powered by Vraltrendingcontent
  • About Us
  • Contact US
  • Disclaimer
  • Privacy Policy
  • Terms of Service
Welcome Back!

Sign in to your account

Lost your password?