pulseio — Support for pulse based protocols

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


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

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