diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-01-14 08:05:50 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-01-14 08:05:50 +0100 |
commit | b4c43ebd0099a4e535ab133d5be1401c383172f7 (patch) | |
tree | 673698f1143bb74c7eb9802f36425ef9df658551 | |
parent | 9adc68ef5c3fd7b4f64777ba857514b76e1043fe (diff) |
Specify station_cfg as single-line dict
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | init.lua | 3 |
2 files changed, 2 insertions, 4 deletions
@@ -64,8 +64,7 @@ The sensor performs a CO₂ measurement every one to five seconds, depending on To use it, you need to create a **config.lua** file with WiFI and MQTT settings: ```lua -station_cfg.ssid = "..." -station_cfg.pwd = "..." +station_cfg = {ssid = "...", pwd = "..."} mqtt_host = "..." ``` @@ -1,4 +1,3 @@ -station_cfg = {} publishing_mqtt = false publishing_http = false @@ -10,7 +9,7 @@ mqttclient = mqtt.Client(device_id, 120) dofile("config.lua") -print("ESP8266 " .. chip_id) +print("MH-Z19 " .. chip_id) ledpin = 4 gpio.mode(ledpin, gpio.OUTPUT) |