This repository has been archived by the owner on May 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |