Image 1 — Smart Irrigation System using an ML + ESP32
Image 2 — Smart Irrigation System using an ML + ESP32
Image 3 — Smart Irrigation System using an ML + ESP32
Image 4 — Smart Irrigation System using an ML + ESP32

Smart Irrigation System using an ML + ESP32

I've been working on a Smart Irrigation System using an ESP32 + machine learning, and I've finally got the main pipeline working end-to-end.

The system uses an ESP32, capacitive soil-moisture sensor, and DHT11 to collect environmental data. The readings are sent to a web dashboard, which communicates with a Flask API that runs the ML model and returns an irrigation prediction.

The overall pipeline is:

ESP32 sensors → Web Dashboard → Flask API → ML Model → Irrigation Prediction

The project currently includes:

  • Real-time soil moisture monitoring
  • Temperature and humidity monitoring
  • Web dashboard hosted by the ESP32
  • ML model for irrigation prediction
  • Model evaluation with a confusion matrix
  • Feature-importance analysis
  • Flask inference server
  • API communication between the dashboard and ML model

The first screenshot shows the live dashboard, including the sensor readings and AI irrigation prediction section.

The second shows part of the JavaScript/API integration and project structure, where the dashboard communicates with the ML inference server.

One thing I found particularly interesting was getting the ESP32, web interface, API, and ML model to actually communicate with each other. The AI prediction wouldn't load until the inference server was running, which made the entire pipeline click for me.

This started as a simple ESP32 soil-moisture monitoring project, but I gradually expanded it into a complete IoT + AI system.

I'm planning to improve it further by collecting more real-world data and adding additional environmental inputs such as light intensity.

I'd appreciate feedback from the ESP32 community, especially on the hardware setup, system architecture, and how I could improve the project further.

🔗 GitHub (Full Video and Requirements) :

https://github.com/aqib-ai-ml/ai-powered-smart-irrigation

u/aqib_builds — 2 days ago
▲ 62 r/esp32projects+5 crossposts

I built an AI-powered smart irrigation system using an ESP32 + ML

I built an AI-powered smart irrigation system using an ESP32 + ML

I've been working on this project for a while, and I finally finished the main AI/ML pipeline.

The system uses an ESP32, a capacitive soil-moisture sensor, and a DHT11 to collect environmental data. I then built a machine-learning model that uses these readings to predict whether irrigation is required.

The interesting part for me was getting the different pieces to actually work together.

The pipeline is basically:

ESP32 sensors → dashboard → Flask API → ML model → irrigation prediction

In the video, I walk through the whole project, including:

  • Collecting soil moisture, temperature, and humidity data
  • Building the web dashboard
  • Preparing the data for ML
  • Training the model
  • Evaluating it with a confusion matrix
  • Looking at feature importance
  • Deploying the model through a Flask server
  • Connecting the dashboard to the ML model through an API
  • Testing the final live prediction

One thing I found particularly interesting was seeing how the model's predictions changed once the inference server was running and the dashboard could communicate with the model.

This started as a simple ESP32 soil-moisture monitoring project, but I gradually expanded it into a complete IoT + AI system.

I'm still planning improvements, especially collecting more real-world data and adding additional environmental inputs such as light intensity.

I'd really appreciate feedback on the project, especially on the ML approach, system architecture, and what I could improve next.

🎥 Full project walkthrough attached.

Github Repository:

https://github.com/aqib-ai-ml/ai-powered-smart-irrigation

u/aqib_builds — 3 days ago

Built an ESP32 RGB lighting controller using a TV remote

I've been learning ESP32 programming recently, and I wanted to share one of my projects.

I made an RGB LED controller that can be controlled using a regular IR remote. (actually my TV remote)

Features:

  • Red, Green, Blue & Yellow colors
  • Fade effect
  • Strobe mode
  • IR code detection through the Serial Monitor

The project uses:

  • ESP32 Dev Module
  • IR Receiver
  • RGB LED
  • IR Remote

The video is only 1 minute 30 seconds and shows everything working.

I'm still learning, so I'd really appreciate any feedback or suggestions. If you have ideas for new features, I'd love to hear them!

https://reddit.com/link/1v763fj/video/dqn3pw4a8lfh1/player

https://preview.redd.it/4fgikwtb8lfh1.png?width=560&format=png&auto=webp&s=f02f339db768561d3d82c654e5541fe6388fead9

https://preview.redd.it/lgrxdwtb8lfh1.png?width=560&format=png&auto=webp&s=85d3f6bb5607ef41a5e040b410ec30cba648f380

https://preview.redd.it/7cdlrwtb8lfh1.png?width=560&format=png&auto=webp&s=f8458d522d559519ca3482096d7da4c96b99ac3d

https://preview.redd.it/4o2dgxtb8lfh1.png?width=560&format=png&auto=webp&s=1ecd86376ac2522ff3ec681e850b4986c1c62490

GitHub:
https://github.com/aqib-ai-ml/

reddit.com
u/aqib_builds — 25 days ago
▲ 43 r/Esphome+3 crossposts

Built an ESP32 RGB lighting controller using a TV remote

I've been learning ESP32 programming recently, and I wanted to share one of my projects.

I made an RGB LED controller that can be controlled using a regular IR remote. (actually my TV remote)

Features:

  • Red, Green, Blue & Yellow colors
  • Fade effect
  • Strobe mode
  • IR code detection through the Serial Monitor

The project uses:

  • ESP32 Dev Module
  • IR Receiver
  • RGB LED
  • IR Remote

The video is only 1 minute 30 seconds and shows everything working.

I'm still learning, so I'd really appreciate any feedback or suggestions. If you have ideas for new features, I'd love to hear them!

GitHub:
https://github.com/aqib-ai-ml/

u/aqib_builds — 25 days ago
▲ 5 r/Esphome+1 crossposts

Would love feedback or suggestions on improving accuracy or next upgrades.

ESP32 soil moisture + temperature monitoring system (first IoT project)

#include <DHT.h>


#define DHTPIN 4
#define DHTTYPE DHT11
#define SOIL_PIN 34


DHT dht(DHTPIN, DHTTYPE);


void setup() {
  Serial.begin(115200);
  dht.begin();


  delay(2000);


  Serial.println("========================================");
  Serial.println(" Smart Environmental Monitoring System");
  Serial.println("========================================");
}


void loop() {


  // Read temperature and humidity
  float temperature = dht.readTemperature();
  float humidity = dht.readHumidity();


  // Read soil moisture
  int soilMoisture = analogRead(SOIL_PIN);


  // Check if DHT11 reading failed
  if (isnan(temperature) || isnan(humidity)) {
    Serial.println("Error: Failed to read from DHT11!");
    delay(2000);
    return;
  }


  // Display sensor values
  Serial.println("----------------------------------------");


  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" °C");


  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.println(" %");


  Serial.print("Soil Moisture: ");
  Serial.println(soilMoisture);


  delay(2000);
}
u/aqib_builds — 2 months ago

Built a simple ESP32 soil moisture + temperature monitoring system (first IoT project)

I built my first IoT project using an ESP32.

It reads:

  • Soil moisture (capacitive sensor)
  • Temperature (DHT11)
  • Humidity (DHT11)

At first, my soil sensor kept outputting a constant 4095, which I later realized was due to the ESP32 ADC range in dry conditions. After testing it in water, I was able to see proper variation in readings (~900–1000 in wet conditions).

Now it outputs real-time environmental data correctly through the serial monitor.

Next step ideas:

  • Add WiFi and send data to a dashboard
  • Store readings for analysis
  • Use ML to predict soil dryness and optimize watering

Would love feedback or suggestions on improving accuracy or next upgrades.

u/aqib_builds — 2 months ago

I’m exploring IoT with right now, and I’d be happy to hear any feedback, ideas, or improvements!

For this project, I am building a smart temperature monitoring system using an ESP32 microcontroller and a DS18B20 temperature sensor.

The components required for this project are:

  • ESP32 Development Board
  • DS18B20 Temperature Sensor
  • 4.7 kΩ Resistor
  • Breadboard
  • Jumper Wires
  • USB Cable

​

#include <OneWire.h>
#include <DallasTemperature.h>


#define ONE_WIRE_BUS 4


OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);


unsigned long startTime;


void setup() 
  {Serial.begin(115200);


  Serial.println();
  Serial.println(" ESP32 Temperature Monitoring");
  Serial.println(" DS18B20 Sensor Initializing...");
  Serial.println(" GPIO Pin: 4");


  sensors.begin();


  delay(2000);


  startTime = millis();


  Serial.println("Sensor Ready!");
  Serial.println();
}


void loop() 


  {sensors.requestTemperatures();


  float tempC = sensors.getTempCByIndex(0);


  if (tempC == DEVICE_DISCONNECTED_C) {
    Serial.println("ERROR: Sensor not detected!");
    delay(1000);
    return;}


  float tempF = tempC * 9.0 / 5.0 + 32.0;


  String status;


  if (tempC < 20) {
    status = "COLD";
  }
  else if (tempC < 30) {
    status = "NORMAL";
  }
  else {
    status = "HOT";
  }


  unsigned long uptime = millis() / 1000;


  Serial.println("---------------------------------");
  Serial.print("Temperature (C): ");
  Serial.print(tempC);
  Serial.println(" °C");


  Serial.print("Temperature (F): ");
  Serial.print(tempF);
  Serial.println(" °F");


  Serial.print("Status: ");
  Serial.println(status);


  Serial.print("Sensor GPIO: ");
  Serial.println(ONE_WIRE_BUS);


  Serial.print("System Uptime: ");
  Serial.print(uptime);
  Serial.println(" seconds");


  Serial.println("---------------------------------");
  Serial.println();


  delay(1000);}
reddit.com
u/aqib_builds — 2 months ago
▲ 3 r/ArduinoProjects+1 crossposts

Temperature monitoring project using an ESP32 and a DS18B20 temperature sensor.

I’m exploring IoT right now, and I’d be happy to hear any feedback, ideas, or improvements!

u/aqib_builds — 2 months ago

Temperature monitoring project using a DS18B20 temperature sensor.

I'm still learning embedded systems and IoT, so I'd appreciate any feedback, suggestions, or ideas for improvements.

u/aqib_builds — 2 months ago

Built a Student Performance Analyzer using Python, Pandas & Matplotlib — looking for feedback

I built a simple student performance analyser using Python, Pandas, and Matplotlib. The project takes input from users (number of students and subjects), stores the marks in a structured format, and then performs calculating average scores and identifying the top scorer.
I’m still learning, so I’d really appreciate any feedback or suggestions.

u/aqib_builds — 3 months ago
▲ 2 r/opencv

[Project] Learning AI step by step: my first face recognition project using Python and OpenCV

I started learning Python seriously around 2 months ago and recently began exploring Computer Vision using OpenCV. Still learning step by step, so I would really appreciate any feedback, suggestions, or things I should improve next.

GitHub project: aqib-ai-ml

u/aqib_builds — 3 months ago

Learning AI step by step: my first face recognition project using Python and OpenCV

I started learning Python seriously around 2 months ago and recently began exploring Computer Vision using OpenCV.

Still learning step by step, so I would really appreciate any feedback, suggestions, or things I should improve next.

Github:- https://github.com/aqib-ai-ml (Not promotion, just if interested and maybe a bit advice)

u/aqib_builds — 3 months ago

Pandas Series and DataFrame Building

I started coding seriously like 2 months ago, now I am not sure but trying to catch up. I mean, I could really help with some tips with the coding from the experts out there!!!

GitHub , check out in here, just a click away!!

u/aqib_builds — 3 months ago
▲ 1 r/OnlyAICoding+1 crossposts

Practicing Pandas: Different ways to create Series and DataFrames

I have been practicing Python and SQL for some time now, and recently I started working with Pandas Series and DataFrames. Though I’m still learning, I’ve built a few small projects along the way and I’m trying my best to improve step by step in the areas I enjoy.

Would really appreciate any feedback or suggestions for improvement.
My GitHub account of Python

import pandas as pd

import numpy as np

#Create DataFrame using 6 methods

#1.

df = pd.DataFrame()

print(df)

print()

#2. (Using Numpy Arrays)

arr1 = np.array([10,20,30])

arr2 = np.array([40,50,60])

arr3 = np.array([70,80,90])

df2 = pd.DataFrame([arr1,arr2,arr3], index=[1,2,3], columns = ["A","B","C"])

print(df2)

print()

#3. (Using Dictionary of Lists)

dic = {"A":[10,20,30], "B":[40,50,60], "C":[70,80,90]}

df3 = pd.DataFrame(dic, index=[1,2,3])

print(df3)

print()

#4. (Using List of Dicitonary)

lst = [{"A":1, "B":2, "C":3}, {"A":4, "B":5, "C":6}, {"A":7, "B":8, "C":9}]

df4 = pd.DataFrame(lst, index = [1,2,3])

print(df4)

print()

#5. (Using Series)

s1 = pd.Series([10,20,30], index=["A","B","C"])

s2 = pd.Series([40,50,60], index=["A","B","C"])

s3 = pd.Series([70,80,90], index=["A","B","C"])

df5 = pd.DataFrame([s1, s2, s3], index=[1,2,3])

print(df5)

print()

#6. (Using Dicitonary of Series)

dic1 = {"A":pd.Series([10,20,30], index=[1,2,3]), "B":pd.Series([40,50,60], index=[1,2,3]),

"C":pd.Series([70,80,90], index=[1,2,3])}

df6 = pd.DataFrame(dic1, columns=["A","B","C"])

print(df6)

reddit.com
u/aqib_builds — 3 months ago