frequencyio — Support for frequency based protocols¶
frequencyio module contains classes to provide access to basic frequency IO.
This module is not available in SAMD21 builds. See the Support Matrix for more info.
All classes change hardware state and should be deinitialized when they
are no longer needed if the program continues after use. To do so, either
deinit() or use a context manager. See
Lifetime and ContextManagers for more info.
import frequencyio import time from board import * frequency = frequencyio.FrequencyIn(D13) frequency.capture_period = 15 time.sleep(0.1)
This example will initialize the the device, set
capture_period, and then sleep 0.1 seconds.
CircuitPython will automatically turn off FrequencyIn capture when it resets all
hardware after program completion. Use
deinit() or a
to do it yourself.