[driver] bmp581 pressure sensor#1339
Merged
salkinium merged 8 commits intomodm-io:developfrom Mar 6, 2026
Merged
Conversation
hshose
reviewed
Mar 3, 2026
hshose
reviewed
Mar 3, 2026
hshose
reviewed
Mar 3, 2026
salkinium
requested changes
Mar 3, 2026
Member
salkinium
left a comment
There was a problem hiding this comment.
Thank you! Just some minor nitpicks.
use std::atomic_bool in example better sign-extension for both pressure and temperature support blocking usage on smol mcus remove deprecated nested layers replace buffer accesses with something more modern
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Driver for the Bosch Sensortec BMP581 pressure and temperature sensor.
Example code outputs:
I am actually on 530 m, nearest weather station reports:
963 hPa at 515 m corresponds to 961 hPa on 530 m, which is basically what the sensor is reading. Absolute pressure accuracy is specified with ±0.5 hPa at 25 °C and ±1.0 hPa (max) over 0–65 °C. Unfortunately my PCB actually gets 40 °C hot, so that reading is correct as well.
Tested the sensor at different output data rates and in both polling and interrupt modes. Could test only in I2C mode and only on STM32 because that's how my board is wired up.