hArduino-1.1: Control your Arduino board from Haskell.

Copyright(c) Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

System.Hardware.Arduino.Parts.SevenSegmentCodes

Description

Character to 7-segment display conversion.

Synopsis

Documentation

char2SS :: Char -> Maybe Word8 Source

Convert a character to a bit-pattern, suitable for display on a seven-segment display. Note that most characters are just not representable in a 7-segment display, in which case we map it to Nothing. However, some substitutions are done, for instance '(' is displayed the same as '['.

The return value is a Word8, although only 7-bits are used; the least significant bit will always be 0. With the traditional coding, the bits correspond to segments ABCDEFG0, i.e., most-significant-bit will be for segment A, next for segment B, and so on.