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

Committer:
jsa1969
Date:
Fri Jun 03 17:05:56 2022 +0000
Revision:
60:6b21ca38ee7c
Parent:
21:01914186ee1d
cleanup

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jsa1969 21:01914186ee1d 1 Copyright (C) 2017 - 2018 Bosch Sensortec GmbH
jsa1969 21:01914186ee1d 2
jsa1969 21:01914186ee1d 3
jsa1969 21:01914186ee1d 4
jsa1969 21:01914186ee1d 5 Redistribution and use in source and binary forms, with or without
jsa1969 21:01914186ee1d 6
jsa1969 21:01914186ee1d 7 modification, are permitted provided that the following conditions are met:
jsa1969 21:01914186ee1d 8
jsa1969 21:01914186ee1d 9
jsa1969 21:01914186ee1d 10
jsa1969 21:01914186ee1d 11 Redistributions of source code must retain the above copyright
jsa1969 21:01914186ee1d 12
jsa1969 21:01914186ee1d 13 notice, this list of conditions and the following disclaimer.
jsa1969 21:01914186ee1d 14
jsa1969 21:01914186ee1d 15
jsa1969 21:01914186ee1d 16
jsa1969 21:01914186ee1d 17 Redistributions in binary form must reproduce the above copyright
jsa1969 21:01914186ee1d 18
jsa1969 21:01914186ee1d 19 notice, this list of conditions and the following disclaimer in the
jsa1969 21:01914186ee1d 20
jsa1969 21:01914186ee1d 21 documentation and/or other materials provided with the distribution.
jsa1969 21:01914186ee1d 22
jsa1969 21:01914186ee1d 23
jsa1969 21:01914186ee1d 24
jsa1969 21:01914186ee1d 25 Neither the name of the copyright holder nor the names of the
jsa1969 21:01914186ee1d 26
jsa1969 21:01914186ee1d 27 contributors may be used to endorse or promote products derived from
jsa1969 21:01914186ee1d 28
jsa1969 21:01914186ee1d 29 this software without specific prior written permission.
jsa1969 21:01914186ee1d 30
jsa1969 21:01914186ee1d 31
jsa1969 21:01914186ee1d 32
jsa1969 21:01914186ee1d 33 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
jsa1969 21:01914186ee1d 34
jsa1969 21:01914186ee1d 35 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
jsa1969 21:01914186ee1d 36
jsa1969 21:01914186ee1d 37 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
jsa1969 21:01914186ee1d 38
jsa1969 21:01914186ee1d 39 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
jsa1969 21:01914186ee1d 40
jsa1969 21:01914186ee1d 41 DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
jsa1969 21:01914186ee1d 42
jsa1969 21:01914186ee1d 43 OR CONTRIBUTORS BE LIABLE FOR ANY
jsa1969 21:01914186ee1d 44
jsa1969 21:01914186ee1d 45 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
jsa1969 21:01914186ee1d 46
jsa1969 21:01914186ee1d 47 OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO,
jsa1969 21:01914186ee1d 48
jsa1969 21:01914186ee1d 49 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
jsa1969 21:01914186ee1d 50
jsa1969 21:01914186ee1d 51 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
jsa1969 21:01914186ee1d 52
jsa1969 21:01914186ee1d 53 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
jsa1969 21:01914186ee1d 54
jsa1969 21:01914186ee1d 55 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
jsa1969 21:01914186ee1d 56
jsa1969 21:01914186ee1d 57 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
jsa1969 21:01914186ee1d 58
jsa1969 21:01914186ee1d 59 ANY WAY OUT OF THE USE OF THIS
jsa1969 21:01914186ee1d 60
jsa1969 21:01914186ee1d 61 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
jsa1969 21:01914186ee1d 62
jsa1969 21:01914186ee1d 63
jsa1969 21:01914186ee1d 64
jsa1969 21:01914186ee1d 65 The information provided is believed to be accurate and reliable.
jsa1969 21:01914186ee1d 66
jsa1969 21:01914186ee1d 67 The copyright holder assumes no responsibility
jsa1969 21:01914186ee1d 68
jsa1969 21:01914186ee1d 69 for the consequences of use
jsa1969 21:01914186ee1d 70
jsa1969 21:01914186ee1d 71 of such information nor for any infringement of patents or
jsa1969 21:01914186ee1d 72
jsa1969 21:01914186ee1d 73 other rights of third parties which may result from its use.
jsa1969 21:01914186ee1d 74
jsa1969 21:01914186ee1d 75 No license is granted by implication or otherwise under any patent or
jsa1969 21:01914186ee1d 76
jsa1969 21:01914186ee1d 77 patent rights of the copyright holder.