User:Chrissy/projects/dot matrix printing: Difference between revisions
< User:Chrissy | projects
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
Later one in the group we manages to print different font sizes <sup>high</sup> and <sub>low</sub> text as well. & even single ASCII characters!1!! But still no ASCII Images. | Later one in the group we manages to print different font sizes <sup>high</sup> and <sub>low</sub> text as well. & even single ASCII characters!1!! But still no ASCII Images. | ||
[[File:Star-SG-10 DIP-switch-settings.png|thumb|not working (maybe it's a me problem idk)]] | |||
[[File:Star-SG-10 speedy.png|thumb]] | |||
===images=== | ===images=== | ||
<gallery mode="nolines" perrow="2" widths="450" heights="250"> | <gallery mode="nolines" perrow="2" widths="450" heights="250"> | ||
Line 12: | Line 15: | ||
===note=== | ===note=== | ||
I think we don't get friends unfortunately, but that's okay. </3 | |||
===python script=== | |||
<syntaxhighlight> | |||
import os | |||
textfile = open("output2.txt", "w") | |||
# for num in range (0,256): | |||
character = chr(178) + chr(182) + chr(219) | |||
# character = chr(num) | |||
print (character, end="", flush=True) | |||
textfile.write(character) | |||
textfile.close() | |||
os.system("lpr output.txt -o raw") | |||
# print (character, end="", flush=True) | |||
## terminal seeing ascii table: ascii -d | |||
# character = chr(59) + chr(89) | |||
# print(character) | |||
## run: python3 matrix.py | |||
</syntaxhighlight> | |||
<syntaxhighlight> | <syntaxhighlight> | ||
# terminal seeing ascii table: ascii -d | |||
character = chr(178) + chr(182) | |||
print(character) | |||
# run: python3 matrix.py | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | to see the thing: | ||
< | <code>cat text_art_1.txt</code> | ||
===started to translate this ASCII Image into code, but even the start didn't work :(=== | |||
<pre style="font-family: 'Courier', monospace; background: white; border: 0; padding: 0;"> | |||
_ / /| | |||
|\\ \/_/ | |||
\_\| / __ | |||
\/_/__\ .-=='/~\ | |||
____,__/__,_____,______)/ /{~}}} | |||
-,------,----,-----,---,\'-' {{~}} | |||
'-==.\}/ | |||
ascii = chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(95) + chr(32) + chr(32) + chr(32) + chr(47) + chr(32) + chr(47) + chr(179) + chr(CR) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(179) | |||
</ | </pre> |
Latest revision as of 13:47, 21 March 2025
some dot matrix experiments during special issue 26 class & afterwards (with lots of desperation)
We were working with the Star-SG-10, me already the second time & I couldn't get the DIP switches in the STAR & IBM Mode to work. At least we were able to set the DIP switches to the "International" character sets. In the first place I tried hard to get ASCII to print, but somehow neither the STAR nor IBM Mode let me…
Later one in the group we manages to print different font sizes high and low text as well. & even single ASCII characters!1!! But still no ASCII Images.
images
note
I think we don't get friends unfortunately, but that's okay. </3
python script
import os
textfile = open("output2.txt", "w")
# for num in range (0,256):
character = chr(178) + chr(182) + chr(219)
# character = chr(num)
print (character, end="", flush=True)
textfile.write(character)
textfile.close()
os.system("lpr output.txt -o raw")
# print (character, end="", flush=True)
## terminal seeing ascii table: ascii -d
# character = chr(59) + chr(89)
# print(character)
## run: python3 matrix.py
# terminal seeing ascii table: ascii -d
character = chr(178) + chr(182)
print(character)
# run: python3 matrix.py
to see the thing:
cat text_art_1.txt
started to translate this ASCII Image into code, but even the start didn't work :(
_ / /| |\\ \/_/ \_\| / __ \/_/__\ .-=='/~\ ____,__/__,_____,______)/ /{~}}} -,------,----,-----,---,\'-' {{~}} '-==.\}/ ascii = chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(95) + chr(32) + chr(32) + chr(32) + chr(47) + chr(32) + chr(47) + chr(179) + chr(CR) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(32) + chr(179)