TIMOTHY MWALA
Published © LGPL

Build Your Own Plants Moisture-Meter πŸŽ‰

"GreenThumb 🌿: Transform your gardening game with our smart plant moisture meter! Monitor and optimize water levels for healthier plants.

BeginnerFull instructions provided1 hour2,385
Build Your Own Plants Moisture-Meter πŸŽ‰

Things used in this project

Story

Read more

Schematics

Scheme

Code

Find here in Arduino code

C/C++
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 0 
Adafruit_SSD1306 display(OLED_RESET);

const int dry = 0; // value for dry sensor
const int wet = 100; // value for wet sensor

void setup()
{ 
  Serial.begin(9600);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}

void loop()
{
  // Clear the buffer.
  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(40, 10);
  display.setTextColor(WHITE);
  
  int sensorVal = analogRead(A0);

  // Sensor has a range of 0 to 100
  // We want to translate this to a scale or 0% to 100%
  int percentageHumididy = map(sensorVal, wet, dry, 100, 0); 

   display.println("Moisture: ");
   display.setTextSize(1);
   display.setCursor(40, 21);
   display.print(percentageHumididy);
   display.println("%");
   display.display();
   delay(1000);
}

sketch

We have chosen the capacitive soil moisture sensor for its accuracy and simplicity. The ESP8266, a versatile Wi-Fi enabled microcontroller, will act as the brain of our moisture meter. To display moisture levels in an easy-to-read format, we have included a vibrant OLED screen. Lastly, the triple adapter will help you power all the components efficiently.

Credits

TIMOTHY MWALA

TIMOTHY MWALA

15 projects β€’ 11 followers
SmartHome Nerd

Comments