Turning my unused CanSat NeXT kit into a battery powered MQTT weather station.
- Temperature and air pressure sensing Uses the Cansat NeXT's LPS35HW barometer and temperature sensor
- Battery monitoring Monitors battery voltage to prevent unexpected dying
- MQTT protocol Uses MQTT for data transmission which makes it easy to connect to home assistant
- Optimized for battery life Uses deep sleep to run at an interval to maximize the battery life
- Cansat NeXT kit
- Should work with any LPS35HW sensor
-
Clone this repository:
git clone https://github.com/ErikUustalu/ESPTemp.git -
Copy src/secrets_example.h to src/secrets.h
-
Update secrets.h with your network and mqtt credentials
#define WIFI_SSID "your-wifi-ssid" #define WIFI_PASSWORD "your-wifi-password" #define MQTT_BROKER_ADDRESS "your-mqtt-broker-address" #define MQTT_BROKER_PORT 1883 #define MQTT_USERNAME "" #define MQTT_PASSWORD "" #define MQTT_CLIENT_ID "esp32" -
Compile and flash the code with PlatformIO