Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Add BME280 example device
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt committed Mar 9, 2018
1 parent 77c20e1 commit 857d509
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
25 changes: 25 additions & 0 deletions devices/example-bme280/Impl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "../features/BME280.h"
#include "Device.h"


constexpr const char BME280_NAME[] = "bme280";
const uint8_t BME280_I2C_ADDR = 0x76;

class Bme280Device : public Device {
public:
Bme280Device() :
bme280(this)
{
this->add(&(this->bme280));
}

private:
BME280<BME280_NAME, BME280_I2C_ADDR> bme280;
};


Device* createDevice() {
return new Bme280Device();
}


6 changes: 6 additions & 0 deletions devices/example-bme280/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
An example device featuring the [Bosch BME280](https://www.bosch-sensortec.com/bst/products/all_products/bme280) environmental sensor.

It provides data on:
- barometric pressure
- relative humidity
- temperature

0 comments on commit 857d509

Please sign in to comment.