seven segment display with width
I'm in the process of making a seven segment display emulator in python
and have run into a small problem. What I have done is make a list for
each number that has a series of numbers representing a character, like so
["000", "001", "000", "001", "000"] This represents the number 1, with 0
been a space, 1 been a pipe character (|) and 2 been a dash.
This works fine for a width of 1 but I want it to be able to go to any
width. I've tried doing this by multiplying the character count by the
width e.g the number one with a width of two would look like ["000000",
"000011", "000000", "000011", "000000"]
The problem I am having is when it encounters a pipe character it will
print it on the same line rather than underneath it. Like so '| |' when it
should be like
|
|
I've tried using \n to print it on a new line but this messes everything
else up.
Any suggestions on how do this in a better way or how to fix my problem
would be appreciated.
Thanks
No comments:
Post a Comment