-
Notifications
You must be signed in to change notification settings - Fork 15
Usage of Sleep #11
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
Comments
Nothing specific to the device. Just providing a small wait time for the busy-wait loop. Is the delay causing issues? |
I'm using this to measure altitude from a model rocket, and so I'd like to sample as often as possible on ascent. I changed it to just use |
@caternuson Do you think is a good Idea to create a parameter in the library to be set and modify this time? |
Did some test with and without the sleep, the average difference with and without time between reading is 8ms. This was done taking three different readings intervals of [0.3, 0.5 1.0] seconds. |
@jposada202020 sorry, missed your previous mention. yah, that's probably fine. i think just "reading as fast as possible" can be slowed down by other things though, like i2c bus speed. |
will do @caternuson Thanks |
We added the attribute in the library, following your input @caternuson we keep the time.sleep. this is a private attribute. This will help people in corner cases, and not breaking old code already written. Thanks, closing for now. |
Adafruit_CircuitPython_BMP3XX/adafruit_bmp3xx.py
Line 160 in 488b7af
Is there a reason
time.sleep(0.002)
is used here rather than just pass? Or is 0.002 seconds specific to the device?The text was updated successfully, but these errors were encountered: