summaryrefslogtreecommitdiff
path: root/tests/float/python36.py.exp
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2021-04-01 09:37:39 -0500
committerJeff Epler <jepler@gmail.com>2021-04-01 10:06:59 -0500
commit489163b74edf9d6f40b3d9e6ee0154d2f1ddce79 (patch)
treedf58719efd11aca997a6cac8584585bec289b0c2 /tests/float/python36.py.exp
parentd0ba75e6dc7e88bf9242ec433a38aba8c085482e (diff)
mimxrt1011: pwmio: Enable basic PWMOut functionality
After this change, the following program works for me on the MIMXRT1010-EVK: ```python import pwmio import board p = pwmio.PWMOut(board.D13, frequency=1_000_000, variable_frequency=True) p.duty_cycle = 32868 while True: pass ``` Querying and varying the duty_cycle and frequency work as well. The lowest frequency obtainable is about 2kHz; there is an additional divider which would allow lower PWM frequencies (I think 1kHz is important for servos?) Something odd happens with very low duty cycles, such as ```python >>> p.frequency = 2000 >>> p.duty_cycle = 2 ``` instead of a symmetrical waveform, it's asymmetrical. With `duty_cycle=4`, the effect disappears. The reason for this is probably hidden in the datasheet, but could affect servos or other things that count pulse widths.
Diffstat (limited to 'tests/float/python36.py.exp')
0 files changed, 0 insertions, 0 deletions