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__ = mappingproxy({'__module__': 'PyFoam.Infrastructure.Blink1', '__doc__': 'Actual class to connect to a blink-device', '__init__': <function Blink1.__init__>, 'patterns': <property object>, 'ticToc': <function Blink1.ticToc>, 'reloadPatterns': <function Blink1.reloadPatterns>, '_Blink1__sendCommand': <function Blink1.__sendCommand>, 'fadeToRGB': <function Blink1.fadeToRGB>, 'play': <function Blink1.play>, 'playRepeated': <function Blink1.playRepeated>, 'nrRepeats': <function Blink1.nrRepeats>, 'stop': <function Blink1.stop>, 'stopAllPlays': <function Blink1.stopAllPlays>, 'stopPlay': <function Blink1.stopPlay>, '__dict__': <attribute '__dict__' of 'Blink1' objects>, '__weakref__': <attribute '__weakref__' of 'Blink1' objects>})
__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

property 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