We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62b39f5 commit 9e7e017Copy full SHA for 9e7e017
examples/ads1x15_fast_read.py
@@ -31,6 +31,7 @@
31
# Read the same channel over and over
32
for i in range(SAMPLES):
33
data[i] = chan0.value
34
+ # Detect repeated values due to over polling
35
if data[i] == data[i-1]:
36
repeats += 1
37
@@ -40,7 +41,7 @@
40
41
42
rate_reported = SAMPLES / total_time
43
rate_actual = (SAMPLES-repeats) / total_time
-# NOTE: cannot detect conversion rates higher than polling rate
44
+# NOTE: leave input floating to pickup some random noise, this cannot estimate conversion rates higher than polling rate
45
46
print("Took {:5.3f} s to acquire {:d} samples.".format(total_time, SAMPLES))
47
print("")
0 commit comments