Skip to content
GitLab
Explore
Sign in
derf
esp8266-nodemcu-ccs811
Compare revisions
5a7888855da087504e8e523a6b79819c529f1830 to dd7ae45aa3c2019f50cf52155648ff7b29b63e62
Commits on Source (2)
Add flash/upload instructions, sample firmware image, and nodemcu-uploader
· 811e2cce
Birte Kristina Friesel
authored
Jan 18, 2024
811e2cce
README: Add resources
· dd7ae45a
Birte Kristina Friesel
authored
Jan 18, 2024
dd7ae45a
Hide whitespace changes
Inline
Side-by-side
.gitmodules
0 → 100644
View file @
dd7ae45a
[submodule "ext/nodemcu-uploader"]
path = ext/nodemcu-uploader
url = https://github.com/kmpm/nodemcu-uploader.git
README.md
View file @
dd7ae45a
...
...
@@ -18,8 +18,9 @@ ccs811.lua has been tested with Lua 5.1 on NodeMCU firmware 3.0.1 (Release
Most practical applications (such as the example in init.lua) also need the
following modules.
*
hdc1080
*
gpio
*
hdc1080
*
http
*
mqtt
*
node
*
tmr
...
...
@@ -88,6 +89,42 @@ influx_attr = "..."
Readings will be published as
`ccs811[influx_attr] eco2_ppm=%d,tvoc_ppb=%d,status=%d,error=%d`
.
Unless
`influx_attr = ''`
, it must start with a comma, e.g.
`influx_attr = ',device=' .. device_id`
.
## 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-12-modules-2024-01-18-19-25-08-float.bin
```
This is required just once; changes to Lua files generally do not mandate
flashing a new NodeMCU image.
After flashing, the firmware will need a few seconds to initialize the
filesystem. You can then upload 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.
## Images
![](
https://finalrewind.org/projects/esp8266-nodemcu-ccs811/media/hass.png
)
## Resources
Mirrors of the esp8266-nodemcu-ccs811 repository are maintained at the following locations:
*
[
Chaosdorf
](
https://chaosdorf.de/git/derf/esp8266-nodemcu-ccs811
)
*
[
git.finalrewind.org
](
https://git.finalrewind.org/esp8266-nodemcu-ccs811/
)
*
[
GitHub
](
https://github.com/derf/esp8266-nodemcu-ccs811
)
nodemcu-uploader
@
6178f40f
Subproject commit 6178f40fff2deadd56b5bc474f9b4475ef444b37
firmware/nodemcu-release-12-modules-2024-01-18-19-25-08-float.bin
0 → 100644
View file @
dd7ae45a
File added