Merge pull request #343 from cyberman54/development

BME280/BME680 documentation details added
This commit is contained in:
Verkehrsrot 2019-04-06 11:38:25 +02:00 committed by GitHub
commit f71f99e9ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 455 additions and 448 deletions

View File

@ -146,7 +146,7 @@ If you're using a device with OLED display, or if you add such one to the I2C bu
# Sensors and Peripherals
You can add up to 3 user defined sensors. Insert sensor's payload scheme in [*sensor.cpp*](src/sensor.cpp). Bosch BME280 / BME680 environment sensors are supported. Enable *flag lib_deps_sensors* for your board in [*platformio.ini*](src/platformio.ini) and configure BME in board's hal file before build. If you need Bosch's proprietary BSEC libraray (e.g. to get indoor air quality value from BME680) further enable *build_flags_sensors*, which comes on the price of reduced RAM and increased build size. RTC DS3231, generic serial NMEA GPS, I2C LoPy GPS are supported, and to be configured in board's hal file. See [*generic.h*](src/hal/generic.h) for all options.
You can add up to 3 user defined sensors. Insert sensor's payload scheme in [*sensors.cpp*](src/sensors.cpp). Bosch BME280 / BME680 environment sensors are supported. Enable flag *lib_deps_sensors* for your board in [*platformio.ini*](src/platformio.ini) and configure BME in board's hal file before build. If you need Bosch's proprietary BSEC libraray (e.g. to get indoor air quality value from BME680) further enable *build_flags_sensors*, which comes on the price of reduced RAM and increased build size. RTC DS3231, generic serial NMEA GPS, I2C LoPy GPS are supported, and to be configured in board's hal file. See [*generic.h*](src/hal/generic.h) for all options and for proper configuration of BME280/BME680.
Output of user sensor data can be switched by user remote control command 0x13 sent to Port 2.

View File

@ -75,7 +75,6 @@ void doHousekeeping() {
"Memory full, counter cleared (heap low water mark = %d Bytes / "
"free heap = %d bytes)",
ESP.getMinFreeHeap(), ESP.getFreeHeap());
SendPayload(COUNTERPORT, prio_high); // send data before clearing counters
reset_counters(); // clear macs container and reset all counters
get_salt(); // get new salt for salting hashes
@ -87,7 +86,6 @@ void doHousekeeping() {
#ifdef BOARD_HAS_PSRAM
if (ESP.getMinFreePsram() <= MEM_LOW) {
ESP_LOGI(TAG, "PSRAM full, counter cleared");
SendPayload(COUNTERPORT, prio_high); // send data before clearing counters
reset_counters(); // clear macs container and reset all counters
get_salt(); // get new salt for salting hashes

View File

@ -17,13 +17,22 @@
#define SPI_CS GPIO_NUM_5
// enable only if device has these sensors, otherwise comment these lines
// tutorial to connect BME sensor see here:
// https://sbamueller.wordpress.com/2019/02/26/paxcounter-mit-umweltsensor/
//
// in platformio.ini append
// lib_deps = <...> ${common.lib_deps_sensors}
// for loading necessary libraries
// BME680 sensor on I2C bus
#define HAS_BME 1 // Enable BME sensors in general
#define HAS_BME680 GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL
#define BME680_ADDR BME680_I2C_ADDR_PRIMARY // connect SDIO of BME680 to GND
// BME280 sensor on I2C bus
//#define HAS_BME 1 // Enable BME sensors in general
//#define HAS_BME280 GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL
//#define BME280_ADDR 0x76 // change to 0x77 depending on your wiring
// user defined sensors
//#define HAS_SENSORS 1 // comment out if device has user defined sensors