copy everything under www/
to root folder of your webserver (php has to be enabled), default for raspberry /var/www/html/
there is no security settings to make it easier to read and understand
start page for browser access loads a gauge and history diagramm (google charts)
data for it will be loaded as json
data will be read from data access files described below
start python readdata.py
this uses a lib mq.py
which is form:
adapted from http://sandboxelectronics.com/?p=165
adapted form https://github.com/tutRPi/Raspberry-Pi-Gas-Sensor-MQ
this will read the start value from ADC and set this as "fresh air" value
this will write data (see file for more details) every 0.5 sec to
smbus_A0.current
smbus_A0.ppb
smbus_A0.ugpm3
smbus_A0.csv
and to the console
since most board do not come with a datasheet/description this is what i used:
data sheet for the heart piece: https://aqicn.org/air/view/sensor/spec/o3.winsen-mq131.pdf
VCC
|
+++
| | RS
+++
|
+------- AOUTDC
|
+++
| | RL (My board used 1kOhm)
+++
O
|
GND
if you have questions or ideas: subbamaggus@gmx.de