GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsThe ESP32-C6 has an IEEE 802.15.4 radio, so besides Wi-Fi 6 and Bluetooth it can speak Zigbee and Thread. Here it runs the Zigbee temperature sensor example from the official Arduino ESP32 core, reads an SHT31 over I2C and reports to Home Assistant through a Sonoff ZBDongle-E plugged into the Home Assistant computer. Zigbee end devices use very little power, so the same sketch can later run from a battery.
Tick anything you already have and the total updates.
Zigbee end device with Wi-Fi 6 and BLE
Temperature and humidity over I2C
Zigbee 3.0 coordinator for Home Assistant
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB-C 5 V for the XIAO. The dongle is powered by the Home Assistant computer.
zigbee_climate.inoVerify & upload in Electrolark// Based on the Zigbee_Temperature_Sensor example in the Arduino ESP32 core 3.x
#ifndef ZIGBEE_MODE_ED
#error "Set Tools > Zigbee mode to Zigbee ED (end device)"
#endif
#include "Zigbee.h"
#include <Wire.h>
#include <Adafruit_SHT31.h>
#define SENSOR_ENDPOINT 10
ZigbeeTempSensor zbSensor = ZigbeeTempSensor(SENSOR_ENDPOINT);
Adafruit_SHT31 sht = Adafruit_SHT31();
void setup() {
Serial.begin(115200);
Wire.begin(); // XIAO ESP32-C6: SDA D4, SCL D5
if (!sht.begin(0x44)) Serial.println("SHT31 not found");
zbSensor.setManufacturerAndModel("Geekobot", "C6ClimateSensor");
zbSensor.setMinMaxValue(-20, 80);
zbSensor.setTolerance(0.3);
zbSensor.addHumiditySensor(0, 100, 1);
Zigbee.addEndpoint(&zbSensor);
if (!Zigbee.begin()) { Serial.println("Zigbee failed to start, rebooting"); ESP.restart(); }
Serial.println("Waiting to join the network...");
while (!Zigbee.connected()) { delay(200); }
Serial.println("Joined");
zbSensor.setReporting(30, 300, 0.2); // report every 30 s to 5 min, or on a 0.2 C change
}
void loop() {
float t = sht.readTemperature();
float h = sht.readHumidity();
if (!isnan(t) && !isnan(h)) {
zbSensor.setTemperature(t);
zbSensor.setHumidity(h);
zbSensor.report();
Serial.printf("%.1f C %.0f %%\n", t, h);
}
delay(30000);
}
Check that ZHA is in pairing mode and that Zigbee mode is set to end device before uploading. Erase flash (Tools > Erase All Flash) and try again.
Set Tools > Zigbee mode and the Zigbee partition scheme as in step 3.
Check SDA/SCL and the address: 0x44 with ADR open, 0x45 with ADR tied high.
No. The sensor talks Zigbee only; the dongle connects it to Home Assistant.
Yes, use the sleepy end-device example and a LiPo on the XIAO battery pads.
Any Zigbee 3.0 coordinator that accepts standard temperature clusters should work, but this guide is tested with ZHA.
5 parts: Seeed Studio Studio XIAO ESP32C6 MCU (Wi-Fi 6, BLE 5.0, Zigbee, Thread), Generic GY-SHT31-D Digital Temperature and Humidity Sensor Module – I2C Interface, Sonoff ZBDongle-E Zigbee 3.0 USB Dongle Plus, Solderless Breadboard and Dupont Jumper Wires (40 pcs). 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 2 hours. The build on this page has 8 steps.
No. This page has the complete, tested code (zigbee_climate.ino).
About ₹4,124 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
What Zigbee end devices and coordinators are; Building Zigbee firmware with the Arduino ESP32 core; Reading an SHT31 over I2C.
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.