Skip to content

Commit

Permalink
Formatted driver and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
BST-Github-Admin authored and kegov committed Jan 23, 2020
1 parent f1162ea commit be6042c
Show file tree
Hide file tree
Showing 5 changed files with 650 additions and 573 deletions.
28 changes: 14 additions & 14 deletions examples/basic_config_state/basic_config_state.ino
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#include <EEPROM.h>
#include "bsec.h"
/* Configure the BSEC library with information about the sensor
* 18v/33v = Voltage at Vdd. 1.8V or 3.3V
* 3s/300s = BSEC operating mode, BSEC_SAMPLE_RATE_LP or BSEC_SAMPLE_RATE_ULP
* 4d/28d = Operating age of the sensor in days
* generic_18v_3s_4d
* generic_18v_3s_28d
* generic_18v_300s_4d
* generic_18v_300s_28d
* generic_33v_3s_4d
* generic_33v_3s_28d
* generic_33v_300s_4d
* generic_33v_300s_28d
*/
18v/33v = Voltage at Vdd. 1.8V or 3.3V
3s/300s = BSEC operating mode, BSEC_SAMPLE_RATE_LP or BSEC_SAMPLE_RATE_ULP
4d/28d = Operating age of the sensor in days
generic_18v_3s_4d
generic_18v_3s_28d
generic_18v_300s_4d
generic_18v_300s_28d
generic_33v_3s_4d
generic_33v_3s_28d
generic_33v_300s_4d
generic_33v_300s_28d
*/
const uint8_t bsec_config_iaq[] = {
#include "config/generic_33v_3s_4d/bsec_iaq.txt"
#include "config/generic_33v_3s_4d/bsec_iaq.txt"
};

#define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // 360 minutes - 4 times a day
Expand Down Expand Up @@ -181,4 +181,4 @@ void updateState(void)
EEPROM.write(0, BSEC_MAX_STATE_BLOB_SIZE);
EEPROM.commit();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#include <EEPROM.h>
#include "bsec.h"
/* Configure the BSEC library with information about the sensor
* 18v/33v = Voltage at Vdd. 1.8V or 3.3V
* 3s/300s = BSEC operating mode, BSEC_SAMPLE_RATE_LP or BSEC_SAMPLE_RATE_ULP
* 4d/28d = Operating age of the sensor in days
* generic_18v_3s_4d
* generic_18v_3s_28d
* generic_18v_300s_4d
* generic_18v_300s_28d
* generic_33v_3s_4d
* generic_33v_3s_28d
* generic_33v_300s_4d
* generic_33v_300s_28d
*/
18v/33v = Voltage at Vdd. 1.8V or 3.3V
3s/300s = BSEC operating mode, BSEC_SAMPLE_RATE_LP or BSEC_SAMPLE_RATE_ULP
4d/28d = Operating age of the sensor in days
generic_18v_3s_4d
generic_18v_3s_28d
generic_18v_300s_4d
generic_18v_300s_28d
generic_33v_3s_4d
generic_33v_3s_28d
generic_33v_300s_4d
generic_33v_300s_28d
*/
const uint8_t bsec_config_iaq[] = {
#include "config/generic_33v_3s_4d/bsec_iaq.txt"
#include "config/generic_33v_3s_4d/bsec_iaq.txt"
};

#define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // 360 minutes - 4 times a day
Expand Down Expand Up @@ -159,7 +159,7 @@ void updateState(void)
{
bool update = false;
if (stateUpdateCounter == 0) {
/* Set a trigger to save the state. Here, the state is saved every STATE_SAVE_PERIOD with the first state being saved once the algorithm achieves full calibration, i.e. iaqAccuracy = 3 */
/* Set a trigger to save the state. Here, the state is saved every STATE_SAVE_PERIOD with the first state being saved once the algorithm achieves full calibration, i.e. iaqAccuracy = 3 */
if (iaqSensor.iaqAccuracy >= 3) {
update = true;
stateUpdateCounter++;
Expand Down
4 changes: 2 additions & 2 deletions examples/esp32DeepSleep/esp32DeepSleep.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Thanks to Dmitry for the sketch(https://community.bosch-sensortec.com/t5/user/viewprofilepage/user-id/4285) */
/* Thanks to Dmitry for the sketch */
#include <Arduino.h>
#include <bsec.h>
/* Configure the BSEC library with information about the sensor
Expand Down Expand Up @@ -133,4 +133,4 @@ void loop() {
esp_sleep_enable_timer_wakeup(time_us);
esp_deep_sleep_start();
}
}
}
Loading

0 comments on commit be6042c

Please sign in to comment.