Edit: the below is bullshit because I didn't remember that arduino's Serial converts integers to a human readable string. I'll try the initialization again with explicit casts...
My printer came with an already printed test page, which specified correct settings for heated points, heating time, and heating interval. I used those to initialize my printer after reset. Setting the code page and international character set didn't really do much, though. The printer will print configuration commands when they are sent, so this is what comes out after initialization:
- First line: Set print parameters (ESC 7 n1 n2 n3) with n1=9, n2=110, n2=10, which sets the most heated points to (9+1)*8 = 80 points, heating time to 110*10us = 1100 us and heating time interval to 10*10us = 100 us.
- Second line: Set character code table (ESC 't' n) with n=16 (Latin 1)
- Third line: Set international character set (ESC 'R' n) with n=2 (german)
- Fourth line: self testing page print (DC 'T') with apparently no real outcome.
The only thing that apparently worked as desired was the printer parameter adjustment. The first line looks a bit faint, whereas the following lines are reasonably crisp.
As special characters are not printed correctly even though I selected latin 1 I might have to create a conversion table from <what I think I want to print> to <what the printer thinks I want to print>.
Before I got this to work I tried adafruit's thermal printer library, which apparently doesn't like the ESP's Tx-only Serial1. After I changed the code to initialize the printer directly things started to work
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.