Capacitive soil moisture sensor for Arduino or ESP8266/ESP32

In this video I'd like to present you cheap chinese capacitive humidity sensor for Arduino or ESP. 

See quick setup with Arduino IDE together with Wemos D1 Lite. It has 3-pin interface and analog output. You can use it as alternative to more expensive Chirp! combo sensor board (see Chirp! here: https://youtu.be/WLyolOGSAXI).

Where to buy:
Capacitive soil moisture sensor v1.2
Wemos D1 mini Lite

#include <SPI.h>
#include <Wire.h>
#include <SFE_MicroOLED.h>
#define PIN_RESET 255
#define DC_JUMPER 0
int i;
int moi = 0;
MicroOLED oled(PIN_RESET, DC_JUMPER); // Example I2C declaration
void setup()
{
oled.begin();
oled.clear(ALL); //will clear out the OLED's graphic memory.
oled.clear(PAGE); //will clear the Arduino's display buffer.
}
void loop()
{
oled.clear(PAGE);
moi = analogRead(0);
oled.setFontType(0);
oled.setCursor(7, 0);
oled.print("Moisture: ");
oled.setFontType(2);
oled.setCursor(14, 15);
oled.print(moi); // Print an integer
oled.display();
delay(1000);
}
view raw moisture.ino hosted with ❤ by GitHub
Petr Lukáš
Application Software Developer, Performance and capacity reporting for IBM zSeries team, experimenting with home automation, sensors, Arduino and ESP