Closed h2zero closed 3 years ago
Got the method for this from the adafruit library.
Instead of delaying for 255ms this will return as soon as a new measurement is ready to read.
In my testing this takes only 26ms on average instead of waiting 255ms.
Edit: Updated the code to prevent possible endless loop and included SPI usage, also reduced the read time to ~18ms in my testing.
Got the method for this from the adafruit library.
Instead of delaying for 255ms this will return as soon as a new measurement is ready to read.
In my testing this takes only 26ms on average instead of waiting 255ms.
Edit: Updated the code to prevent possible endless loop and included SPI usage, also reduced the read time to ~18ms in my testing.