blink1-0.3.1: Control library for blink(1) LED from ThingM

Safe HaskellNone
LanguageHaskell98

System.Hardware.Blink1

Synopsis

Documentation

data RGB a Source

Constructors

RGB 

Fields

red :: !a
 
green :: !a
 
blue :: !a
 

Instances

Functor RGB 
Read RGB8 
Show RGB8

uses #RRGGBB format

Applicative RGB 
Num a => Num (RGB a) 
(Num a, Ord a, Bounded a) => Monoid (RGB a)

like Sum but clips overflowing values at maxBound

newtype Delay Source

time is measured in centiseconds

Constructors

Delay 

getVersion :: Blink1 b => b -> IO (Char, Char) Source

setColor :: Blink1 b => b -> RGB8 -> IO () Source

set the given color now

fadeToColor :: Blink1 b => b -> Delay -> RGB8 -> IO () Source

setServerDown :: Blink1 b => b -> Bool -> Delay -> IO () Source

enable/disable serverdown mode

playPattern :: Blink1 b => b -> Maybe PatternStep -> IO () Source

stop or start playing the sequence at the given position

setPattern :: Blink1 b => b -> PatternStep -> Delay -> RGB8 -> IO () Source

set the sequence pattern for the given position

getPattern :: Blink1 b => b -> PatternStep -> IO (Delay, RGB8) Source

getSerialNum :: Blink1 b => b -> IO Word32 Source

setSerialNum :: Blink1 b => b -> Word32 -> IO () Source

testBlink1 :: Blink1 b => b -> IO (Either [Word8] Bool) Source