You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this library, the standard readRawTemperature and ReadRawPressure code makes use of delays to allow the sensor to perform the reads as per the datasheet. When reading the pressure at higher resolutions, these delays can exceed 31ms (5ms for temp and another 26ms for the highest resolution pressure).
On an Arduino Mega 2560 with a 16mhz board hooked up to a 10DoF, it takes approximately:
1.8ms to call getEvent on the Mag
1.1ms to call getEvent on the Accel
1.1ms to call getEvent on the Gyro
Rather than wasting that time sitting in a delay, we could be processing data from other sensors.
I'd like to propose adding a method like "isDataReady()" which internally would issue the requests and record what time the request would complete, and when called after that time has passed, read the data into a persisted variable and kick off the next request. When polling in this mode, the getTemperature and getPressure calls would simply use the persisted variable rather than requesting / reading the data directly.
The text was updated successfully, but these errors were encountered:
In this library, the standard readRawTemperature and ReadRawPressure code makes use of delays to allow the sensor to perform the reads as per the datasheet. When reading the pressure at higher resolutions, these delays can exceed 31ms (5ms for temp and another 26ms for the highest resolution pressure).
On an Arduino Mega 2560 with a 16mhz board hooked up to a 10DoF, it takes approximately:
Rather than wasting that time sitting in a delay, we could be processing data from other sensors.
I'd like to propose adding a method like "isDataReady()" which internally would issue the requests and record what time the request would complete, and when called after that time has passed, read the data into a persisted variable and kick off the next request. When polling in this mode, the getTemperature and getPressure calls would simply use the persisted variable rather than requesting / reading the data directly.
The text was updated successfully, but these errors were encountered: