I took some time and hacked out an ascii lcd number printer. It is written in Ruby and contains no comments. The number you want printed must be passed as the first parameter. The size of the output can be changed by passing a second number. The default size is 2.
How to run:
| ~/test> ruby lcd.rb 0123456789 5 |
Click to directly download lcd.rb
| # filename 'lcd.rb' # Use: takes a number as the first parameter, # a size value > 0 as the second parameter # Output: Displays the number as ascii # By: Louis Casillas, e-mail: oxaric@gmail.com zero = [" - ", one = [" ", two = [" - ", three = [" - ", four = [" ", five = [" - ", six = [" - ", seven = [" - ", eight = [" - ", nine = [" - ", numbers = ARGV[0].to_s output = "" while runs < runs_for_this_level if (size > 1) for j in (1...size) for j in (1..size) for j in (0..temp) else for j in (0..temp) end end |