diff --git a/.gitignore b/.gitignore index 88cabfd..72669cb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .clang_complete .ccls /logs/ +/src/http_static.cpp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bbb8374 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +# Default target +all: build + +flash: precompile_static pio_upload + +build: precompile_static pio_build + +precompile_static: + ./populate_static.py + +pio_build: + pio run + +pio_upload: + pio run -t upload diff --git a/README.org b/README.org index 1028a21..c5a9545 100644 --- a/README.org +++ b/README.org @@ -5,7 +5,52 @@ + https://github.com/bfaliszek/CJMCU-8118_InfluxDB -** Levels +** Installation +It requires [[https://platformio.org/][platformio]] and =gnu make=, obviously. + +#+NAME: build +#+BEGIN_SRC sh :eval never +make # or `make build` +#+END_SRC + +#+NAME: flash the firmware +#+BEGIN_SRC sh :eval never +make flash +#+END_SRC + +** Usefull info for future +*** Levels #+BEGIN_EXAMPLE -In the event of TVOC issues, inspections should be carried out to find the root cause of the problem and address it as exposure to the VOCs may harm health. Indoor VOC levels up to 350 ppb are acceptable. However they should not exceed 500ppb. – CO2 ppm range of 450 to 2000 ppm (parts per million). +In the event of TVOC issues, inspections should be carried out to find +the root cause of the problem and address it as exposure to the VOCs +may harm health. Indoor VOC levels up to 350 ppb are +acceptable. However they should not exceed 500ppb. – CO2 ppm range of +450 to 2000 ppm (parts per million). #+END_EXAMPLE +*** Particulate matter ++ PM1 :: are extremely fine particulates with a diameter of fewer than 1 microns. ++ PM2.5 :: (also known as fine particles) have a diameter of less than 2.5 microns. ++ PM10 :: means the particles have a diameter less than 10 microns, or 100 times smaller than a millimeter. + +** TODO +In gneral I want the stack to be pluggable as much as possible. The current scope of wanted readings is not including any plans on it's implementations. + ++ [v] Thermometer :: provided by HDC1080 ++ [v] Humidity sensor :: provided by HDC1080 ++ [] Particulate matter + - [] PM2.5 :: i'd to start with it + - [] PM10 + - [] PM1 :: I might need it to indoor mod ++ [] Preasure sensor ++ [] Seismograph ++ [] Ionising radiation sensor ++ [] UV-sensor ++ [] Gas sensors: + - [v] CO2 :: eCO2 provided by CCS811 + - [v] TVOC :: eTVOC provided by CCS811 + - [] CO + - [] H2S + - [] NH3 + - [] O2 + - [] LEL + - [] smoke and fire diff --git a/src/http_static.cpp b/src/http_static.cpp.tmpl similarity index 59% rename from src/http_static.cpp rename to src/http_static.cpp.tmpl index f3349c9..ab651fb 100644 --- a/src/http_static.cpp +++ b/src/http_static.cpp.tmpl @@ -2,9 +2,9 @@ namespace http_static { const char index_html[] PROGMEM = R"rawliteral( -#include "./static/index.html" - )rawliteral"; +%index.html% +)rawliteral"; const char sensor_things_resp[] PROGMEM = R"rawliteral( -#include "./static/sensor_things_tmpl.json"%" - )rawliteral"; +%sensor_things_tmpl.json% +)rawliteral"; }