GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsSend readings in a structured format a custom app can parse, and let the app request exactly the fields it wants. A remote user interface needs data the app can read reliably, so the board offers three formats of the same readings: human text, CSV for spreadsheets, and JSON-style key-value pairs for code. Choosing a format is a real engineering decision, human text is easy to read and awkward to parse, JSON is the reverse. Offering all three from one sketch makes the trade-off visible.
The ESP32 is a 3.3V board: never connect a 5V signal straight to a GPIO pin.
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
10k resistor: the fixed half of the light-sensing divider
DHT11 temperature and humidity sensor
LDR: its resistance falls as the light gets brighter
HC-05 Bluetooth module: a serial link to your phone
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_085_bluetooth_environmental_da.inoVerify & upload in Electrolark#include <HardwareSerial.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <DHT.h>
#define DHTPIN 14
#define DHTTYPE DHT11
HardwareSerial bt(2); // UART2: RX on GPIO16, TX on GPIO17
DHT dht(DHTPIN, DHTTYPE);
Adafruit_SSD1306 display(128, 64, &Wire, -1);
float temp = 0, hum = 0;
int light = 0;
int format = 0; // 0 text, 1 CSV, 2 JSON
const char* formatName[3] = {"TEXT", "CSV", "JSON"};
bool autoSend = false;
unsigned long interval = 3000;
unsigned long lastSend = 0;
unsigned long lastRead = 0;
void readSensors()
{
float t = dht.readTemperature();
float h = dht.readHumidity();
if (!isnan(t)) temp = t;
if (!isnan(h)) hum = h;
light = map(analogRead(34), 0, 1023, 0, 100);
}
void sendReadings()
{
if (format == 0)
{
bt.print("Temperature: ");
bt.print(temp, 1);
bt.print(" C, Humidity: ");
bt.print(hum, 0);
bt.print(" %, Light: ");
bt.print(light);
bt.println(" %");
}
else if (format == 1)
{
bt.print(millis() / 1000);
bt.print(",");
bt.print(temp, 1);
bt.print(",");
bt.print(hum, 0);
bt.print(",");
bt.println(light);
}
else
{
bt.print("{\"t\":");
bt.print(temp, 1);
bt.print(",\"h\":");
bt.print(hum, 0);
bt.print(",\"l\":");
bt.print(light);
bt.print(",\"up\":");
bt.print(millis() / 1000);
bt.println("}");
}
}
void setup()
{
analogReadResolution(10); // ESP32 is 12-bit; use 0-1023 like the examples
bt.begin(9600, SERIAL_8N1, 16, 17);
Serial.begin(9600);
dht.begin();
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { while (true) { } }
display.setTextColor(SSD1306_WHITE);
display.setTextSize(1);
readSensors();
bt.println("R=read A=auto X=stop 1=text 2=csv 3=json");
}
void loop()
{
if (millis() - lastRead > 2000)
{
lastRead = millis();
readSensors();
}
if (bt.available())
{
char command = bt.read();
if (command == 'R') sendReadings();
if (command == 'A') { autoSend = true; bt.println("Auto ON"); }
if (command == 'X') { autoSend = false; bt.println("Auto OFF"); }
if (command == '1') { format = 0; bt.println("Format: text"); }
if (command == '2') { format = 1; bt.println("Format: csv (time,temp,hum,light)"); }
if (command == '3') { format = 2; bt.println("Format: json"); }
}
if (autoSend && millis() - lastSend > interval)
{
lastSend = millis();
sendReadings();
}
display.clearDisplay();
display.setCursor(0, 0);
display.print("REMOTE DASHBOARD");
display.drawRect(0, 12, 62, 22, SSD1306_WHITE);
display.setCursor(4, 15);
display.print("TEMP");
display.setCursor(4, 24);
display.print(temp, 1);
display.print("C");
display.drawRect(66, 12, 62, 22, SSD1306_WHITE);
display.setCursor(70, 15);
display.print("HUMID");
display.setCursor(70, 24);
display.print(hum, 0);
display.print("%");
display.drawRect(0, 36, 128, 14, SSD1306_WHITE);
display.setCursor(4, 39);
display.print("LIGHT ");
display.print(light);
display.print("%");
display.fillRect(56, 38, map(light, 0, 100, 0, 68), 10, SSD1306_WHITE);
display.setCursor(0, 54);
display.print(formatName[format]);
display.print(" ");
display.print(autoSend ? "AUTO" : "MANUAL");
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.
Check SDA on GPIO21 and SCL on GPIO22, power from 3V3, and that the sketch uses address 0x3C (some boards are 0x3D).
Check that DATA goes to the GPIO in the sketch, and wait two seconds between reads: the DHT11 is slow.
The LDR and the 10k resistor must meet at the analog GPIO: LDR to 3V3, resistor to GND.
A remote user interface needs data the app can read reliably, so the board offers three formats of the same readings: human text, CSV for spreadsheets, and JSON-style key-value pairs for code. Choosing a format is a real engineering decision, human text is easy to read and awkward to parse, JSON is the reverse. Offering all three from one sketch makes the trade-off visible.
Send R in text mode: Temperature: 28.4 C, Humidity: 61 %, Light: 74 %. Send 2 then R: 145,28.4,61,74 ready for a spreadsheet. Send 3 then R: a JSON object a phone app can parse directly.
Yes. It is project 85 of 120 in the Geekobot Titan Kit, in level 13 (Bluetooth). 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 on the ESP32 expansion board and the breadboard with jumper wires.
10 parts: ESP32-WROOM-32 38-Pin Development Board, USB Cable, Solderless Breadboard, Dupont Jumper Wires (40 pcs), Carbon Film Resistor 1/4W 5% (Pack of 10), 0.96" OLED Display 128x64, Generic DHT11 Digital Temperature & Humidity Sensor Module, 5 mm LDR Light Dependent Resistor, HC-05 6-Pin Bluetooth Serial Module with Button 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 advanced project and takes about 45 minutes. The build on this page has 7 steps.
No. This page has the complete, tested code (titan_kit_085_bluetooth_environmental_da.ino).
About ₹1,094 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Remote UI updating; Choosing a data format for its consumer; Text, CSV and JSON compared; Escaping quote characters inside a string.
The ESP32 is a 3.3V board: never connect a 5V signal straight to a GPIO pin.
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.