Closed hansju-11 closed 1 year ago
As an example of "how to include a custom sensor" I will use an scd30 C02 sensor https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library https://www.sensirion.com/de/umweltsensoren/kohlendioxidsensor/kohlendioxidsensoren-scd30/ https://www.sparkfun.com/products/15112
sensor is in parallel to the dispaly on i2c bus with address 0x61
in sensor.cpp
in payload.cpp -include sensor.h
in paxcounter.conf (define are still in use in some other parts of the code)
change js parser
As an example of "how to include a custom sensor" I will use an scd30 C02 sensor https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library https://www.sensirion.com/de/umweltsensoren/kohlendioxidsensor/kohlendioxidsensoren-scd30/ https://www.sparkfun.com/products/15112
sensor is in parallel to the dispaly on i2c bus with address 0x61
in sensor.cpp
in payload.cpp -include sensor.h
in paxcounter.conf (define are still in use in some other parts of the code)
define HAS_SENSOR_1 1
define HAS_SENSOR_2 1
define HAS_SENSOR_3 0
change js parser
return decode(bytes, [uint16, ufloat, ufloat], ['C02', 'temp', 'humidity']); } return decoded; */