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

Add error checks for all I2C reads and writes and return error values #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

waynepiekarski
Copy link

Currently if the device is not connected or if any of the I2C operations fail, the library will receive all zeros, continue with the calculations, and then return incorrect values. Previously it was not possible to return an error code from read() either, so this has been added as well.

@waynepiekarski
Copy link
Author

@patrickelectric I was hoping you could review this code which fixes some bugs in the sensor error handling

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