PyFoam.Infrastructure.Blink1 module

class PyFoam.Infrastructure.Blink1.Blink1(ticColor=None)[source]

Bases: object

Actual class to connect to a blink-device

_Blink1__sendCommand(command, **params)

Sends a command

__dict__ = dict_proxy({'__module__': 'PyFoam.Infrastructure.Blink1', '_Blink1__sendCommand': <function __sendCommand>, 'stopPlay': <function stopPlay>, 'ticToc': <function ticToc>, 'stop': <function stop>, 'play': <function play>, 'stopAllPlays': <function stopAllPlays>, 'nrRepeats': <function nrRepeats>, 'playRepeated': <function playRepeated>, 'patterns': <property object>, 'reloadPatterns': <function reloadPatterns>, '__dict__': <attribute '__dict__' of 'Blink1' objects>, '__weakref__': <attribute '__weakref__' of 'Blink1' objects>, '__doc__': 'Actual class to connect to a blink-device', '__init__': <function __init__>, 'fadeToRGB': <function fadeToRGB>})
__init__(ticColor=None)[source]

Constructs the object. Tests for blink-device only in the beginning. If none is found an exception is thrown

__module__ = 'PyFoam.Infrastructure.Blink1'
__weakref__

list of weak references to the object (if defined)

fadeToRGB(colorString, time=1, ledn=0)[source]
nrRepeats()[source]

Number of running threads

patterns
play(patternName)[source]

Plays a defined pattern

playRepeated(patternName, interval)[source]

Plays a pattern at regular intervals (starts a new thread and returns the handle)

reloadPatterns()[source]
stop()[source]

Completely reset. Stop all threads and fade to black

stopAllPlays()[source]

Stop all threads that repeatedly play patterns

stopPlay(thread)[source]

Using a thread handle stop a thread

ticToc(color=None)[source]

Alternate color between upper and lower side of the blink. Transition time depends on the times between calls