GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsCheck how thirsty a plant is from your phone: the soil moisture shows on the OLED and on a web page. The soil sensor gives a lower or higher voltage as the soil gets wetter or drier. The ESP32 reads it on GPIO34, an ADC1 pin that still works while Wi-Fi is on, turns it into a percentage with your two calibration numbers, and shows it on the OLED and on a page served from its own Wi-Fi network.
The ESP32 is a 3.3V board: never connect a 5V signal straight to a GPIO pin.
Push only the sensor's prongs into the soil and keep water away from the ESP32 and the OLED.
The page has no login beyond the Wi-Fi password: change the password in the sketch before you use it in a shared space.
Every part for this build comes in the Geekobot Titan Kit box, a Geekobot exclusive, together with the parts for all 120 projects, from a first blinking LED to a smart fan and a reaction game. The wiring below is the kit's own wiring.
Tick anything you already have and the total updates.
ESP32 DevKit V1 (38-pin): the brain of every Titan Kit project, with Wi-Fi and Bluetooth
Male-to-female and female-to-female leads for the modules
Soil moisture sensor: the reading changes as the soil gets wetter
ESP32 expansion board from the kit: every GPIO has its own S, V, G header
Follow the colours: red is power, dark grey is ground, blue is a signal.
titan_kit_111_wifi_plant_monitor.inoVerify & upload in Electrolark#include <WiFi.h>
#include <WebServer.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display(128, 64, &Wire, -1);
WebServer server(80);
const char* ssid = "Titan-Plant";
const char* password = "titan1234";
int soilPin = 34; // ADC1: still readable while Wi-Fi is on
int dryValue = 3000; // reading in dry air: note yours from the Serial Monitor
int wetValue = 1300; // reading in a glass of water
int percent = 0;
String status()
{
if (percent < 30) return "Dry - water me";
if (percent > 80) return "Wet";
return "OK";
}
void handleRoot()
{
String h = "<!DOCTYPE html><html><head><meta name='viewport' content='width=device-width, initial-scale=1'>";
h += "<meta http-equiv='refresh' content='5'><title>Titan Plant</title>";
h += "<style>body{font-family:sans-serif;text-align:center}b{font-size:64px}</style></head><body><h2>My Plant</h2>";
h += "<b>" + String(percent) + "%</b><p>" + status() + "</p></body></html>";
server.send(200, "text/html", h);
}
void setup()
{
Serial.begin(9600);
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { while (true) { } }
display.setTextColor(SSD1306_WHITE);
WiFi.softAP(ssid, password);
server.on("/", handleRoot);
server.begin();
Serial.print("Open http://");
Serial.println(WiFi.softAPIP());
}
void loop()
{
server.handleClient();
static unsigned long last = 0;
if (millis() - last < 1000)
{
return;
}
last = millis();
int raw = analogRead(soilPin); // 0-4095
percent = constrain(map(raw, dryValue, wetValue, 0, 100), 0, 100);
Serial.printf("Raw %d, moisture %d%%\n", raw, percent);
display.clearDisplay();
display.setTextSize(1);
display.setCursor(0, 0);
display.print("Soil moisture");
display.setTextSize(3);
display.setCursor(0, 16);
display.print(percent);
display.print("%");
display.setTextSize(1);
display.setCursor(0, 46);
display.print(status());
display.setCursor(0, 56);
display.print(WiFi.softAPIP().toString());
display.display();
}
Use a micro-USB data cable (some cables only charge), install the CP210x or CH340 driver if no port appears, pick Tools > Board > ESP32 Dev Module and hold the BOOT button on the board until the upload starts.
Join the Wi-Fi network named in the sketch first, then type the address the Serial Monitor prints (usually 192.168.4.1). Turn mobile data off if the phone keeps leaving the network.
Note the reading in dry air and in a glass of water, then put those two numbers into the map() line of the sketch.
Check SDA on GPIO21 and SCL on GPIO22, power from 3V3, and that the sketch uses address 0x3C (some boards are 0x3D).
The soil sensor gives a lower or higher voltage as the soil gets wetter or drier. The ESP32 reads it on GPIO34, an ADC1 pin that still works while Wi-Fi is on, turns it into a percentage with your two calibration numbers, and shows it on the OLED and on a page served from its own Wi-Fi network.
The OLED shows the moisture percentage and Dry, OK or Wet. Join Titan-Plant (password titan1234) and open 192.168.4.1 to see the same reading. Water the pot and the number rises within a few seconds.
Yes. It is project 111 of 120 in the Geekobot Titan Kit, in level 16 (Wi-Fi, IoT and new sensors). Every part on the list comes in the kit box, and you can also buy the parts one by one from the list above.
No. Every Titan Kit project is wired with jumper wires on the ESP32 expansion board and the breadboard.
The ESP32's second ADC (ADC2) is used by the Wi-Fi radio, so ADC2 pins cannot be read while Wi-Fi is on. GPIO34 is on ADC1.
6 parts: ESP32-WROOM-32 38-Pin Development Board, USB Cable, Dupont Jumper Wires (40 pcs), Capacitive Soil Moisture Sensor – 3.3V/5V Analog Output, PH2.54-3P Interface, 0.96" OLED Display 128x64 and ESP32 38-Pin Expansion Board. On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 30 minutes. The build on this page has 5 steps.
No. This page has the complete, tested code (titan_kit_111_wifi_plant_monitor.ino).
About ₹853 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Calibrating an analog sensor with two known points; Why ADC1 pins are used when Wi-Fi is on; Showing the same data on a screen and a web page; Status thresholds (dry, OK, wet).
The ESP32 is a 3.3V board: never connect a 5V signal straight to a GPIO pin. Push only the sensor's prongs into the soil and keep water away from the ESP32 and the OLED. The page has no login beyond the Wi-Fi password: change the password in the sketch before you use it in a shared space.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.