Code Monkey home page Code Monkey logo

bsec_bme680_linux's Introduction

bsec_bme680_linux

Read the BME680 sensor with the BSEC library on Linux (e.g. Raspberry Pi)

Intro

Working example of fully using the BME680 sensor on Linux (e.g. Raspberry Pi) with the precompiled BSEC library, which allows to read calibrated environment values including an actual Indoor Air Quality (IAQ) score.

It makes use of Bosch's provided driver and can be configured in terms of it. Readings will be directly output to stdout in a loop.

Prerequisites

Download the BSEC software package from Bosch and put it into ./src, then unpack.

Configure and Compile

Optionally make changes to make.config.

Depending on how your sensor is embedded it might be surrounded by other components giving off heat. Use an offset in °C in bsec_bme680.c to compensate. The default is 5 °C:

#define temp_offset (5.0f)

To compile: ./make.sh

Usage

Output will be similar to this:

$ ./bsec_bme680
2017-12-27 18:47:21,[IAQ (1)]: 33.96,[T degC]: 19.61,[H %rH]: 46.41,[P hPa]: 983.39,[G Ohms]: 540924.00,[S]: 0
2017-12-27 18:47:24,[IAQ (1)]: 45.88,[T degC]: 19.61,[H %rH]: 46.41,[P hPa]: 983.41,[G Ohms]: 535321.00,[S]: 0
2017-12-27 18:47:26,[IAQ (1)]: 40.65,[T degC]: 19.60,[H %rH]: 46.45,[P hPa]: 983.39,[G Ohms]: 537893.00,[S]: 0
2017-12-27 18:47:29,[IAQ (1)]: 30.97,[T degC]: 19.60,[H %rH]: 46.42,[P hPa]: 983.41,[G Ohms]: 542672.00,[S]: 0
  • IAQ (n) - Accuracy of the IAQ score from 0 (low) to 3 (high).
  • S: n - Return value of the BSEC library

It can easily be modified in the output_ready function.

The BSEC library is supposed to create an internal state of calibration with increasing accuracy over time. Each 10.000 samples it will save the internal calibration state to ./bsec_iaq.state (or wherever you specify the config directory to be) so it can pick up where it was after interruption.

Further

You can find a growing list of tools to further use and visualize the data here.

Troubleshooting

bsec_bme680 just quits without a message

Your bsec_iaq.state file might be corrupt or incompatible after an update of the BSEC library. Try (re)moving it.

bsec_bme680_linux's People

Contributors

alexh-name avatar pshep avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.