Teensy Typewriter using a Teensy 3.6 with USB keyboard and USB printer
The source code for the USB receipt printer ESC/POS library is up on github. See the picture gallery for a printer test showing various text sizes, effects, and a QR code printed in graphics mode. My printer does not have built-in bar code functions (the Adafruit Mini thermal printer does) so all bar codes must be printed as graphics. In addition, the graphics commands for the Adafruint printer do not work on my printer so I added a new function that uses an older graphics mode.
While looking for retro/steampunk keyboards on Amazon, I found two exceptional keyboards. No, I will not be buying a 12 pound $1600 keyboard in my lifetime.
I first thought the next one was a real typewriter with USB but it is only a keyboard with two large scroll wheels. I am not sure what the lever does. Maybe send carriage return and linefeed. It is wireless so not useful for this project.
There are a few more reasonable priced retro keyboards with round key caps like old mechanical keyboards. No retro thermal printers though.
I uploaded a picture of the Teensy Typewriter. Mostly just plug in the USB cables. The only soldering required is the 5 header pins on the Teensy for the USB host cable.
Install the Arduino IDE which can be downloaded from Arduino.cc. Follow the Arduino instructions.
Install the Teensyduino add-on following the PJRC instructions.
Plug the Teensy 3.6 into the computer.