Retro Challenge 2015 – Update #7 – QR Code Fun!

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.
QRCodeProgramScreenShot

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:

EpsonCharacterCodeTable

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:

fr_4619_sm

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!

3 Responses to “Retro Challenge 2015 – Update #7 – QR Code Fun!” »»

  1. Comment by Canal | 01/25/16 at 3:20 am

    Nice !

    QRCode on C64 and printer … see QR Code on Minitel (should works with Viewdata too) :

    http://canal.chez.com/java/QRCode_edta_besaba_diapo_edta.gif

    and :

    http://canal.chez.com/photos/CU1600%2323_25.jpg

    Alex. – http://canal.chez.com/

  2. Comment by tgeorge | 01/25/16 at 8:13 pm

    That’s awesome! Just to be clear (so I don’t get anymore credit than I deserve), my program isn’t calculating the QR Code (yet?) but just emulating it and sending it to the printer… That was my goal for this particular piece of the overall project. 🙂

  3. Comment by Canal | 01/30/16 at 11:57 am

    To be honest : I do the *same* as you : no computing at all 😉

    But look at the video here: http://www.lemon64.com/forum/viewtopic.php?t=41755

    Alex. – https://twitter.com/CanalEDTA/with_replies

Leave a Reply »»