Pwmio
Library
Stemi pwmio library exposes everything from the original pwmio library in addition to modifying a class (PulseOut). Check out official pwmio documentation here.
pwmio.py
class PWMOut:
... # all other pwmio methods and properties
@staticmethod
def deinit_all():
...
Explanations
| Returns | Description | |
|---|---|---|
deinit_all | Releases all pins that were used through stemi.pwmio |
Example
main.py
from stemi.pwmio import PWMOut
import board
import time
pwm = PWMOut(board.IO12, duty_cycle=2 ** 16 - 1, frequency=50)
for angle in range(0, 360, 20):
pwmLed.duty_cycle = int(65535 * (angle / 360))
time.sleep(0.1)
PWMOut.deinit_all() # deinitializes pwm