Sparky's giveaways › 2026-12

EXAMPLE: ESP32 Wi-Fi climate sensor with MQTT

EXAMPLE CONTENT - sample giveaway created by the seed script. Replace with a real project before launch.

Complete Arduino sketch for an ESP32 + BME280 temperature/humidity sensor that publishes to MQTT and auto-discovers in Home Assistant. (Example giveaway.)

Platform: ESP32 / Arduino IDE

EXAMPLE GIVEAWAY - created by the seed script. Replace with a real project before launch.

What you get

  • climate_sensor.ino: Arduino sketch (Wi-Fi, MQTT, Home Assistant discovery, deep sleep)
  • README.md: wiring diagram and setup steps

Wiring

BME280 ESP32
VIN 3V3
GND GND
SDA GPIO 21
SCL GPIO 22

Licensed under the MIT License. Have fun, and tell Sparky what you build in the comments of our ESP32 posts!

Get the free code

Enter your email and Sparky will unlock the download right here. 1 file(s) included.

We use your email to deliver this download and, only if you tick the box, our newsletter. See our privacy policy.