From 0f04ddf734b2af8d4d96c0149eaa62d978a498ad Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 13 Jan 2024 08:50:50 +0100 Subject: README: Add flashing instructions --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 422c33f..a4e919f 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,32 @@ It can also publish readings to InfluxDB. * CO₂ sensor: MH-Z19 * Display: 128×32 OLED via SSD1306 (128×64 also supported with some changes) +## Flashing + +This repository contains a NodeMCU build that provides the required modules. +You can flash it using e.g. esptool: + +```bash +esptool write_flash 0x00000 firmware/nodemcu-release-13-modules-2022-04-17-19-03-07-integer.bin +``` + +After flashing, the firmware will need a few seconds to initialize the +filesystem. You can use that time to create `config.lua` (see below) and then +flash the Python code, e.g. using nodemcu-uploader: + +```bash +ext/nodemcu-uploader/nodemcu-uploader.py upload *.lua +``` + +Afterwards, you can check whether everything works using the serial connection, +e.g. + +```bash +pyserial-miniterm --dtr 0 --rts 0 /dev/ttyUSB0 115200 +``` + +You may need to adjust the `/dev/tty` device name. + ## Configuration WiFi, Home Assistant, and InfluxDB configuration is read from `src/config.lua`. -- cgit v1.2.3