diff --git a/devices/example-bme280/Impl.cpp b/devices/example-bme280/Impl.cpp new file mode 100644 index 0000000..00b8b43 --- /dev/null +++ b/devices/example-bme280/Impl.cpp @@ -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; +}; + + +Device* createDevice() { + return new Bme280Device(); +} + + diff --git a/devices/example-bme280/Readme.md b/devices/example-bme280/Readme.md new file mode 100644 index 0000000..537210f --- /dev/null +++ b/devices/example-bme280/Readme.md @@ -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