No description
Find a file
2026-04-12 18:31:45 +02:00
.gitignore first commit 2026-04-05 20:51:59 +02:00
config.sample.py first commit 2026-04-05 20:51:59 +02:00
main.py feed watchdog on success only 2026-04-12 18:31:45 +02:00
README.md first commit 2026-04-05 20:51:59 +02:00

ESP32 + AHT20

Written in MicroPython, reads temperature and humidity from an AHT20 sensor and sends them to InfluxDB or MQTT broker.

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-20251209-v1.27.0.bin

Get the dependencies:

mpremote mip install "github:targetblank/micropython_ahtx0/ahtx0.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 main.py
ampy --port /dev/ttyACM0 put config.py

Wiring

3V3, GND, SDA, SCL