Skip to content

Commit 8de4cf6

Browse files
committed
update RTD documentation
1 parent b7b74d1 commit 8de4cf6

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

shared-bindings/frequencyio/FrequencyIn.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,20 @@
4141
//| ========================================================
4242
//|
4343
//| FrequencyIn is used to measure the frequency, in hertz, of a digital signal
44-
//| on an incoming pin. Accuracy has shown to be within 1kHz, if not better.
45-
//| Current maximum detectable frequency is ~512kHz.
46-
//| It will not determine pulse width (use ``PulseIn``).
44+
//| on an incoming pin. Accuracy has shown to be within 10%, if not better. It
45+
//| is recommended to utilize an average of multiple samples to smooth out readings.
46+
//|
47+
//| Frequencies below 1KHz are not currently detectable.
48+
//|
49+
//| FrequencyIn will not determine pulse width (use ``PulseIn``).
4750
//|
4851
//| .. class:: FrequencyIn(pin, capture_period=10)
4952
//|
5053
//| Create a FrequencyIn object associated with the given pin.
5154
//|
5255
//| :param ~microcontroller.Pin pin: Pin to read frequency from.
5356
//| :param int capture_period: Keyword argument to set the measurement period, in
54-
//| milliseconds. Default is 10ms; maximum is 500ms.
57+
//| milliseconds. Default is 10ms; range is 1ms - 500ms.
5558
//|
5659
//| Read the incoming frequency from a pin::
5760
//|
@@ -166,7 +169,9 @@ MP_DEFINE_CONST_FUN_OBJ_1(frequencyio_frequencyin_clear_obj, frequencyio_frequen
166169

167170
//| .. attribute:: capture_period
168171
//|
169-
//| The capture measurement period.
172+
//| The capture measurement period. Lower incoming frequencies will be measured
173+
//| more accurately with longer capture periods. Higher frequencies are more
174+
//| accurate with shorter capture periods.
170175
//|
171176
//| .. note:: When setting a new ``capture_period``, all previous capture information is
172177
//| cleared with a call to ``clear()``.

shared-bindings/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Module Supported Ports
4242
`bleio` **nRF**
4343
`busio` **All Supported**
4444
`digitalio` **All Supported**
45+
`frequencyio` **SAMD51**
4546
`gamepad` **SAMD Express, nRF**
4647
`hashlib` **ESP8266**
4748
`i2cslave` **SAMD Express**

0 commit comments

Comments
 (0)