Skip to content

Instantly share code, notes, and snippets.

@mmmries
Created August 7, 2012 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmmries/3281741 to your computer and use it in GitHub Desktop.
Save mmmries/3281741 to your computer and use it in GitHub Desktop.
borq2
ssd_map = [
[1,1,1,0,1,1,1], #0
[0,0,1,0,0,1,0], #1
[1,0,1,1,1,0,1], #2
[1,0,1,1,0,1,1], #3
[0,1,1,1,0,1,0], #4
[1,1,0,1,0,1,1], #5
[1,1,0,1,1,1,1], #6
[1,0,1,0,0,1,0], #7
[1,1,1,1,1,1,1], #8
[1,1,1,1,0,1,1], #9
]
def num_to_lcd(num, size)
rows = []
ssd = ssd_map[num]
rows << (" " + (ssd[0] == 1 ? "-" : " ") * size + " ")
end
puts num_to_lcd(1,2).join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment