Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BME280読出データ不整合の防止 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glider-gun
Copy link

現在の BME280 のサンプルコードでは測定データのレジスタを1つ1つ読み出していますが、データシートの 6. 冒頭に

To read out data after a conversion, it is strongly recommended to use a burst read and not address every register individually. This will prevent a possible mix-up of bytes belonging to different measurements and reduce interface traffic.

とあるように、このままでは読み出しのタイミングによっては不整合なデータとなってしまう可能性があります。このため推奨に従って該当箇所をブロック読み出しに置き換え、全測定データを一度に読み出すようにしました。

このように全測定データを一度に読み出した場合データの整合性が保たれることが 6.1 節で保証されています。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant