No description
- Python 100%
| .gitignore | ||
| bme280_float.py | ||
| config.sample.py | ||
| main.py | ||
| README.md | ||
ESP32 + BME280 sensor
Written in MicroPython. Reads temperature, humidity and barometric pressure. Sends it to a MQTT broker. InfluxDB will be added soon.
Installation
- Download MicroPython here
- Then flash it to your microcontroller, ESP32 for example:
esptool.py -p /dev/ttyACM0 erase_flash
esptool.py -p /dev/ttyACM0 --baud 460800 write_flash 0 ESP32_GENERIC_C3-20250911-v1.26.1.bin
Get the dependencies:
- BME280 driver: https://github.com/targetblank/micropython_ahtx0
- My helper functions (InfluxDB, MQTT) for MicroPython: https://code.f2n.me/finn/MicroPythonHelpers
mpremote mip install "github:robert-hh/BME280/bme280_float.py"
mpremote mip install "https://code.f2n.me/finn/MicroPythonHelpers/raw/branch/main/package.json"
Use Thonny (graphical IDE) or ampy (CLI) to flash the files to the microcontroller.
Example with ampy:
ampy --port /dev/ttyACM0 put config.py
ampy --port /dev/ttyACM0 put main.py
Wiring
3V3, GND, SDA, SCL