Qr code/business card how to?

Hey guys! I’m trying to figure out how to get a qr code image into the arduboy kinda like in the promo ad :upside_down_face:. Is there a guide to do this somewhere in the forums?

1 Like

To generate your QR code, grab a random QR code generator

Once you’ve got an image of your QR code, make sure that:

  • It fits on the screen i.e. it’s less than 128x64.
    • If it isn’t, shrink it.
  • It only uses black and white.
    • If you shrink it, other colours like grey might be introduced with some shrinking algorithms.

Then you can convert it using one of the many available converters.

Then you can just throw it in a simple bit of code, like this:

#include <Arduboy2.h>

const uint8_t QRCode[] PROGMEM =
	32, 32,
	0x80, 0xBE, 0xA2, 0xA2, 0xA2, 0xBE, 0x80, 0xFF, 0x3E, 0xED, 0x19, 0x6E, 0x92, 0x43, 0x82, 0xFB, 0xF7, 0x2C, 0x6D, 0x9F, 0xF1, 0x3C, 0x5B, 0x93, 0xFF, 0x80, 0xBE, 0xA2, 0xA2, 0xA2, 0xBE, 0x80, 0x5C, 0x8C, 0xA3, 0xD2, 0x9A, 0xFD, 0xAA, 0x95, 0x5B, 0x64, 0x72, 0x22, 0xA5, 0x9F, 0x27, 0x01, 0xB2, 0xBD, 0xA4, 0xAA, 0xBD, 0x58, 0x50, 0xF4, 0x39, 0x2A, 0x0D, 0xFD, 0xF7, 0x75, 0xE9, 0x6A, 0xF9, 0x8F, 0xC0, 0x8D, 0x01, 0x23, 0x55, 0x70, 0x2F, 0x5B, 0x31, 0xFC, 0xD2, 0x59, 0x1E, 0xCC, 0x86, 0xE5, 0x60, 0x1F, 0xDE, 0xFA, 0x09, 0x71, 0x3B, 0x5E, 0x2A, 0x6C, 0x6F, 0xBB, 0x4A, 0xD8, 0x01, 0x7D, 0x45, 0x45, 0x45, 0x7D, 0x01, 0xFF, 0x26, 0x8A, 0x65, 0x27, 0xD2, 0x1B, 0xD8, 0x04, 0x4D, 0xCC, 0x41, 0xA5, 0xCF, 0xA8, 0x60, 0x40, 0x27, 0x35, 0xB7, 0xD0, 0xB1, 0xBA, 0xBA, 0x93,

Arduboy2 arduboy;

void setup(void)

void loop(void)
	arduboy.fillRect(46, 14, 36, 36);
	Sprites::drawOverwrite(48, 16, QRCode, 0);	

Fun fact: the QR code in this demo will take you to this thread.