uses BBC micro:bit to measure and display indoor air quality using Bosch BME680 and/or Sensirion SGP30

Dependencies:   microbit

uses Bosch BME680 and/or Sensirion SGP30 sensors to measure indor air quality

sensors should be connected to BBC micro:bit using i2c

commands are received and data is being sent using uBit / nordic radio protocol

display ---

last line always indicates: - first dot: bme680 detected - second dot: sgp30 detected - third dot: sgp 30 setting humidity/temperature - fourth dor: sgp30 measuring - fith dot: bme680 measuring

the detect dots should be in a stable state (not blinking) the measuring dots should be blinking (constant light means: measurement failed)

if only one bme680 is present: - first 3 lines indicate gas resistence (air quality / more dots == worse quality) - fourth line indicates humidity level

if only sgp30 is present: - first two lines indicate SGP30 VOC level - third and fourth line indicate sgp30 CO2 level

if both sensors are present: - first line indicates SGP30 VOC level - second line line indicates sgp30 CO2 level - third line indicates bme680 gas resistence (air quality) - fourth line indicates bme 680 humidity level

buttons - B display state, switches betweeen - full bright - low light - display off

AB reset sgp30 baseline in non volatile storage

data logging -- during measurements the minimum and mximum values for each measured value (temperature, air pressure, humidity,gas resistance, VOC, CO2) are being stored in non volatile storage those (and the last measurement results) are being shown when btn A has been pressed

Revisions of main.cpp

Revision Date Message Actions
41:8f891ea56b0d 2019-02-13 cleanup 2nd i2c Bus if not required File  Diff  Annotate
40:a67a880cb538 2019-02-13 for the moment: seperate the i2c busses of the chips and remove all locking File  Diff  Annotate
39:efe22f143e47 2019-02-13 moved debugging information File  Diff  Annotate
38:0f29a0ea64ca 2019-02-12 attempt to attack on the parrallel influence problem File  Diff  Annotate
34:069c4f6d5b2c 2019-02-12 code cleanup File  Diff  Annotate
33:af2dfab24ca9 2019-02-12 tests and usage of moving average for bme gas resistence File  Diff  Annotate
28:56273b8282ca 2018-12-14 no point displaying sgp300 min values, they are always 0/400 File  Diff  Annotate
27:cb75a0c5c52a 2018-12-14 store bme680 gas resistance indexed by humidity File  Diff  Annotate
24:07a1d2e6914e 2018-12-05 release fibers when loops have finished File  Diff  Annotate
20:2f11b93f4cbf 2018-12-05 use btn B to change display state (bright, low, off) File  Diff  Annotate
19:52e19461e867 2018-12-05 fix data log wipe File  Diff  Annotate
18:c4ac93e01027 2018-12-05 data logging for sgp30 File  Diff  Annotate
17:a2c4dd192146 2018-12-05 more logging File  Diff  Annotate
14:71060505061e 2018-12-05 more flexible nvstore File  Diff  Annotate
13:996026828be7 2018-12-05 update status of sgp onmeasurements File  Diff  Annotate
12:96eb06e837f4 2018-12-05 independent fibres/loops for bme and agp measuring File  Diff  Annotate
11:6844a5578b4f 2018-12-04 code cleanup / smaller functions File  Diff  Annotate
10:8e6b71a46871 2018-12-04 store bme680 max gas resistence File  Diff  Annotate
9:5150afa50eb6 2018-12-04 re-init sensors on btn AB File  Diff  Annotate
8:1bdb50e03d39 2018-12-04 display more data on btn B File  Diff  Annotate
7:80429cbd095f 2018-12-04 properly schedule measure loop at start File  Diff  Annotate
6:fc6f2f08724b 2018-12-04 fixup sgp30 self test File  Diff  Annotate
5:9a04d6d0c2ff 2018-12-04 cleanup UI (less text, more dots) File  Diff  Annotate
4:aef0bddcdf50 2018-12-04 less display.scroll / more information in dots File  Diff  Annotate
3:6084ab9ff0c9 2018-12-04 handle cases where only one sensor is present File  Diff  Annotate
2:544117df8c65 2018-12-04 sgp30 File  Diff  Annotate
1:f9245fb53737 2018-12-03 add humidity physics File  Diff  Annotate
0:cef60cc92da0 2018-12-03 initial bme680 File  Diff  Annotate