-
Notifications
You must be signed in to change notification settings - Fork 10
getReads
Starmbi edited this page Jan 12, 2020
·
4 revisions
returns the physically reads over wire to the sensor. Should only be used, after a measurement is finished.
unsigned int getReads();With non blocking reads and a calibrated sensor with hasValue(), mostly a value of 1 is returned.
You can adjust the readings with setTimeOffset()
With forced readings, for example getRaw() or getLux() or hasValue(TRUE) the count of readings depends on processor speed and bus speed.
On a ESP8266 and a bus speed of 100.000 (default) I can ask the sensor 2000 times per second for the value, if I force physically reads.
So, I only can cycle 2000 times/sec. thru the loop.
With adjusted timing and non blocking reads, I am able to cycle 62.000 times/sec. thru the loop!
Please refer to timing.