# Translation from character to DP A B C D E F G pins

const CHAR_TRANSLATOR = Dict(
    '0' => 0b01111110,
    '1' => 0b00110000,
    '2' => 0b01101101,
    '3' => 0b01111001,
    '4' => 0b00110011,
    '5' => 0b01011011,
    '6' => 0b01011111,
    '7' => 0b01110000,
    '8' => 0b01111111,
    '9' => 0b01111011,

    'a' => 0b01110111, # A
    'A' => 0b01110111,
    'b' => 0b01111011,
    'B' => 0b01111111,
    'c' => 0b00001101,
    'C' => 0b01111011,
    'd' => 0b01111011,
    'D' => 0b01111011, # d
    'e' => 0b01101111,
    'E' => 0b01001111,
    'f' => 0b01000111, # F
    'F' => 0b01000111,
    'g' => 0b01111011,
    'G' => 0b01111011, # g
    'h' => 0b00010111,
    'H' => 0b00110111,
    'i' => 0b00110000, # I
    'I' => 0b00110000,
    'j' => 0b01111100, # J
    'J' => 0b01111100,
    # 'k'
    'l' => 0b00000110,
    'L' => 0b00001110,
    # 'm'
    # 'n'
    'o' => 0b00011101,
    'O' => 0b01111110,
    'p' => 0b01100111, # P
    'P' => 0b01100111,
    'q' => 0b01110011,
    'Q' => 0b01110011, # q
    # 'r'
    's' => 0b01011011, # S
    'S' => 0b01011011,
    # 't'
    'u' => 0b00111110, # U
    'U' => 0b00111110,
    # 'v'
    # 'w'
    # 'x'
    'y' => 0b00111011,
    'Y' => 0b00111011, # y
    # 'z'

    '-' => 0b00000001,
    '_' => 0b00001000,
    ' ' => 0b00000000
)

const NUM_TRANSLATOR = Dict(
    UInt8(0) => 0b01111110,
    UInt8(1) => 0b00110000,
    UInt8(2) => 0b01101101,
    UInt8(3) => 0b01111001,
    UInt8(4) => 0b00110011,
    UInt8(5) => 0b01011011,
    UInt8(6) => 0b01011111,
    UInt8(7) => 0b01110000,
    UInt8(8) => 0b01111111,
    UInt8(9) => 0b01111011,

    UInt8(10) => 0b00000001, # -
    UInt8(11) => 0b01001111, # E
    UInt8(12) => 0b00110111, # H
    UInt8(13) => 0b00001110, # L
    UInt8(14) => 0b01100111, # P
    UInt8(15) => 0b00000000  # blank
)
