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

RuntimeError: Timeout: Waiting for INT_STATUS_2, die_temp_ready. when using get_temperature() #6

Open
Gadgetoid opened this issue Jul 9, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Gadgetoid
Copy link
Member

Title says all, there's a timeout condition on INT_STATUS_2 when attempting to read the temperature from device- something must be awry:

Traceback (most recent call last):
  File "get-temperature.py", line 20, in <module>
    temp = max30105.get_temperature()
  File "/home/pi/max30105-python/library/max30105/__init__.py", line 413, in get_temperature
    raise RuntimeError('Timeout: Waiting for INT_STATUS_2, die_temp_ready.')
RuntimeError: Timeout: Waiting for INT_STATUS_2, die_temp_ready.
@Gadgetoid Gadgetoid self-assigned this Jul 9, 2020
@Gadgetoid Gadgetoid added the bug Something isn't working label Jul 9, 2020
Gadgetoid added a commit that referenced this issue Jul 9, 2020
This two pronged approach involving a code change and update to i2cdevice should prevent get_temperature from timing out.

A duplicate read to the interrupt register (which is cleared upon read) was causing it to always read as 0.

The timeout loop has been re-written to avoid a duplicate read.

i2c_device>=0.0.7 is required, since `get()` was causing duplicate reads.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant