Strip down firmware based on version NRZ-2017-100
of the luftdaten.info airrohr-firmware:
https://github.com/opendata-stuttgart/sensors-software/tree/master/airrohr-firmware
Build the image with the build script:
./build.sh
The image is stored in the builds
folder.
The flash script flashes the indicated image to the ESP8266 module:
./flash /dev/cu.wchusbserial1420 builds/airrohr-fw-0.3.0.bin
The first argument denotes the device file name, the second argument denotes the firmware to be flashed.
- SDS and DHT wiring: https://raw.githubusercontent.com/opendata-stuttgart/meta/master/files/nodemcu-v3-schaltplan-sds011.jpg
- Board: NodeMCU 1.0 (ESP-12E Module)
- CPU Frequency: 80MHz
- Flash Size: 4M (3M SPIFFS)
The project has the following external dependencies:
- [email protected]
- DHT sensor [email protected]
- [email protected]
- Adafruit Unified [email protected]
- Pin 1 (TX) → Pin D1 (GPIO5)
- Pin 2 (RX) → Pin D2 (GPIO4)
- Pin 3 (GND) → GND
- Pin 4 (2.5m) → unused
- Pin 5 (5V) → VU
- Pin 6 (1m) → unused
- Pin 1 → 3V3
- Pin 2 → Pin D7 (GPIO13)
- Pin 3 → unused
- Pin 4 → GND
The luftdaten.info API needs for each sample type a specific pin number to correctly match the measurements:
- DHT22 → Pin 7
- SDS011 → Pin 1