led module

class led.BlinkstickLedControl(serial=None, ledIndex=0, turnOffAfterTimeoutDefault_ms=None)

Bases: object

async close()
static fromConfig(ledsConfig)
async setColor(*rgbTuple)
async turnOff(leaveIfOverridden=True)
async turnOffAfterTimeout(timeout_ms=0, startTimestamp_ms=None, leaveIfOverridden=True)
class led.LedsConfig(ledsConfig: dict)

Bases: object

class led.PiLedControl(loop, gpioClient, redPin=None, greenPin=None, bluePin=None, turnOffAfterTimeoutDefault_ms=None)

Bases: GpioControl

Have the LED(s) blink.

lasting_ms: After the blink cycles, duration of the

LED(s) remaining on in milliseconds. If 0, will turn off immediately. If -1, will stay on indefinitely.

async close()
colorToLevels(*rgbTuple)
static fromConfig(loop, gpioClient, ledsConfig)
async pinsToColor()
async setColor(*rgbTuple)
async start(shallResetGpio=True)
async storeBlinkScript()

Stores an LED blink script to a pigpiod or GPIO server.

p0: Number of blink cycles. p1: Duration of one blink cycle in milliseconds. p2: After the blink cycles, duration of the LED(s) remaining on

in milliseconds. If 0, will turn off immediately. If LEAVE_ON_MAGIC_NUMBER, will stay on indefinitely.

p3: 1 if the red LED shall be included, else 0. p4: 1 if the green LED shall be included, else 0. p5: 1 if the blue LED shall be included, else 0.

async storeSetColorScript()
async storeTurnOffScript()
async turnOff(leaveIfOverridden=True)
async turnOffAfterTimeout(timeout_ms=0, startTimestamp_ms=None, leaveIfOverridden=True)