Skip to content

Commit 9e7e017

Browse files
authored
Expand comments
1 parent 62b39f5 commit 9e7e017

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/ads1x15_fast_read.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
# Read the same channel over and over
3232
for i in range(SAMPLES):
3333
data[i] = chan0.value
34+
# Detect repeated values due to over polling
3435
if data[i] == data[i-1]:
3536
repeats += 1
3637

@@ -40,7 +41,7 @@
4041

4142
rate_reported = SAMPLES / total_time
4243
rate_actual = (SAMPLES-repeats) / total_time
43-
# 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
4445

4546
print("Took {:5.3f} s to acquire {:d} samples.".format(total_time, SAMPLES))
4647
print("")

0 commit comments

Comments
 (0)