mp-se / kegmon

DIY scale for beer keg monitoring
MIT License
10 stars 4 forks source link

Add support for bme and reintroduce unique_ptr #26

Closed profawk closed 11 months ago

profawk commented 1 year ago

this pr does the following:

  1. adds support for BME280
  2. allows leveraging of the safety given by unique_ptr ~3. calls the relevant reset only for the active sensor~

please talk to me before you do big changes the code. this is tested with a BME280

mp-se commented 1 year ago

Please revert the changes that you made to the reset logic. This should be valid for all sensors. Reset should do a power off/on for the connected sensor.

Also run the pre commit hooks so the checks passes.

profawk commented 1 year ago

I fixed the CI errors and reverted the reset change

mp-se commented 12 months ago

I can see that this uses i2c bus connection and you connected this to the same bus as the displays ?

I will need to do an update to the schema as well to make it clear how to hook up this sensor and it will require a different wiring for the scale base as well.

Have you tested this setup with a long cable (1.5 - 2m) to the scale so its confirmed that it will work when placing the sensor in the base of the scale ?

mp-se commented 11 months ago

I have merged this PR into the dev stream and checked that the sensor can be read. Will do more testing before making a release.

I also added the pressure value that the sensor can provide.