pulseio — Support for pulse based protocols

The pulseio module contains classes to provide access to basic pulse IO.

Libraries

All libraries change hardware state and should be deinitialized when they are no longer needed. To do so, either call deinit() or use a context manager.

For example:

import pulseio
import time
from board import *

with pulseio.PWMOut(D13) as pin:
  pin.duty_cycle = 2 ** 15
  time.sleep(0.1)

This example will initialize the the device, set duty_cycle, sleep 0.1 seconds and then deinit() the hardware.