luebbe / homie-node-collection

Collection of Node implementations for the Homie-ESP8266 library
MIT License
26 stars 12 forks source link

Add files via upload #14

Open keesma opened 3 years ago

keesma commented 3 years ago

Added support for BMP280 (based on BME280)

keesma commented 3 years ago

The BME280 also measures humidity. The other functions are the same. There is a different underlying library from Adafruit. The I2C addresses are the same but the device type is different. I am not sure what the best way is handling duplicate code. I used the BME280 code as a base and made some adjustments.

While using it I noticed that the BMP280 cannot do forced measurements. I might have to provide updated source code for this.

luebbe commented 3 years ago

There is a lot that can go into a common base class when I look at the code. I'll let you finish your PR and afterwards I'll refactor. I'm also thinking about making the sensor nodes more generic. loop() is basically always the same, only taking the measurement differs.