I was making good progress while snowed in this weekend. I wrote up a really quick QR code display routine. This is done “the hard way”, simply transcoding the QR code into “PETSCII”. Test output to screen worked perfectly. You can see that I split the QR code into 11×11 quadrants. This allowed me to separate things for easily implementing them in code. As I mentioned in my prior blog post, my original concept was to print these via custom fonts that emulated the PETSCII graphics.
After printing them with my custom fonts on the printer, the result turned out too narrow/small. After all the work of setting up custom fonts and building the QR code using them, I wound up scrapping that entire plan. I opted to use the in-built ASCII tables. Here’s a quick screen shot from the Epson manual for my printer:
What I did was set up variables called T$, B$, F$, L$ and R$. These were CHR$(223) for T$ (Top), CHR$(220) for B$ (Bottom), CHR$(219) for F$ (Full), CHR$(221) for L$ (Left), and finally CHR$(222) for R$ (Right). Turns out that printing these graphics using the QR Code split/grid in the screen shot above worked perfectly. Two printed characters per grid space. Once setting this up, I was pleasantly greeted with the following from my printer:
Things are looking good and this scanned perfectly in a random QR Code app on my phone.
Next up, let’s get the formatting proper and run some final tests of base functionality!