|
41 | 41 | //| ========================================================
|
42 | 42 | //|
|
43 | 43 | //| 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``). |
47 | 50 | //|
|
48 | 51 | //| .. class:: FrequencyIn(pin, capture_period=10)
|
49 | 52 | //|
|
50 | 53 | //| Create a FrequencyIn object associated with the given pin.
|
51 | 54 | //|
|
52 | 55 | //| :param ~microcontroller.Pin pin: Pin to read frequency from.
|
53 | 56 | //| :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. |
55 | 58 | //|
|
56 | 59 | //| Read the incoming frequency from a pin::
|
57 | 60 | //|
|
@@ -166,7 +169,9 @@ MP_DEFINE_CONST_FUN_OBJ_1(frequencyio_frequencyin_clear_obj, frequencyio_frequen
|
166 | 169 |
|
167 | 170 | //| .. attribute:: capture_period
|
168 | 171 | //|
|
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. |
170 | 175 | //|
|
171 | 176 | //| .. note:: When setting a new ``capture_period``, all previous capture information is
|
172 | 177 | //| cleared with a call to ``clear()``.
|
|
0 commit comments