Close

Final Assembly, and Coding Sucks!

A project log for TinyTyper (Stage One)

One REALLY lousy, 26char/line "typewriter", from a PS/2 keyboard, an old IBM receipt printer, and a bit of Arduino magic...

starhawkStarhawk 06/29/2021 at 06:390 Comments

Yeah that took some *serious* finagling, cajoling, arguing, and similar forms of persuasion to get it all together and in there... miniature prybar work was indeed involved! (Yay for miniature slot-head screwdrivers...)

Also I FREAKING HATE CODING ARDUINO CRAP.

Remember what I said in an earlier log (or was it Project Details? I don't remember, I'm jamming this out as fast as I can and it's almost 11:30 Pacific Time, eff me lol) about how anything fancier / newer code-wise, than 80s BASIC loses me quickly? Yeah, that.

There's something interacting behind the scenes with the PS2KeyAdvanced library and the LiquidCrystal library, and the LiquidCrystal_I2C library variant doesn't do the same dance the same way, so the code won't compile. Alas, the one time I conversed (via email, FWIW) with the author of PS2KeyAdvanced, he displayed an attitude towards hopeless n00bs such as me that is best described as having the approachability of a cactus wrapped in razor wire and electric cattle fencing, so I'll not be doing *that* again -- which, sadly, makes the use of his work all the more difficult.

In the meantime, the code that *is* provided, gives basic functionality. You get 26 characters per line. You get CAPS and lowercase, numb3rs, $pec!@l c#@r@c+er$ -- everything you need to bang out a password you'll have forgotten in the time it takes a computer to crack it (BTW, that's a soapbox issue of mine -- good password guidelines for people who are in charge of such things -- https://xkcd.com/936/ -- thank you in advance ;) ). The F# keys and others have been disabled.

If you want to change the number of characters per line, change the value of the third hexadecimal value in the line

byte initprnt[3] = {0x27, 0x33, 0x32}

0x32 = 26 characters per line
0x31 = 22 characters per line
0x30 = 19 characters per line

Those are, unfortunately, the only options you get, as far as I can tell. (Sorry!) It works by varying the 'font' selection inside the printer. The first is "Font B", the second is "Font A" at a small size; the third, "Font A" at a larger size. That's all you get. There's supposedly a "Font C" ( 0x33 ) but I've not been that daring yet.

Discussions