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

Spot when pressure sensor has stalled and reset it. #95

Open
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
1 participant
@amcewen
Copy link

commented Mar 14, 2019

What does this implement/fix? Explain your changes.

This fixes the problem with the MPL3115A2 on the pysense board occasionally hanging. The code gets into an infinite loop if the sensor fails to respond over I2C.

The code now spots if there hasn't been a response, and resets the MPL3115A2 sensor. The failure is communicated to the main code as an exception, and no result is returned, but the next time the call is made the sensor will be reset and will return values again.

Does this close any currently open issues?

This will close issue #46.

Where has this been tested?

  • Tested on a pysense board with a LoPy4
  • (sysname='LoPy4', nodename='LoPy4', release='1.18.1.r1', version='v1.8.6-849-b0520f1 on 2018-08-29', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0.1')

Adrian McEwen added some commits Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.