crystalfontz-0.1: Control Crystalfontz LCD displays.




LCD devices

data LCD Source

Represents an open LCD device. Abstract.

withLCD :: FilePath -> (LCD -> IO a) -> IO aSource

Run an IO action with a connection to an LCD.

open :: FilePath -> IO LCDSource

Open the LCD at a particular device file. Maybe use withLCD instead?

close :: LCD -> IO ()Source

Close the LCD file. Maybe use withLCD instead?

Display parameters

contrast :: LCD -> Int -> IO ()Source

Set contrast. 0 is light, 254 is dark, 95 is recommended.

backlight :: LCD -> Int -> IO ()Source

Set backlight brightness. 0 is off, 100 is full on.

cursorStyle :: LCD -> Int -> IO ()Source

Set the cursor style. Valid styles are from [0..4].

Displaying text

clear :: LCD -> IO ()Source

Clear the screen.

data Pos Source


Pos Int Int 


move :: LCD -> Pos -> IO ()Source

Move the cursor.

write :: LCD -> Pos -> String -> IO ()Source

Write to the LCD at a specified position.

Indicator LEDs

setLED :: LCD -> Int -> Bool -> IO ()Source

Turn on or off an indicator LED. Valid indices are from [0..7].

clearLEDs :: LCD -> IO ()Source

Turn off all indicator LEDs.