I am using qrcode library https://github.com/ricmoo/QRCode
for generating QR code at runtime
but i can not print it using Adafruit Thermal Printer
which uses method printer.printBitmap(x,y,qrdata)
now my problem is how to convert the qrcode generated from qrcode library to
static const uint8_t PROGMEM adaqrcode_data[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, .....
edit :
i tried the code
QRCode qrcode;
int buffsize = qrcode_getBufferSize(10);
uint8_t *qrcodeBytes= malloc(buffsize);
qrcode_initText(&qrcode, qrcodeBytes, 10, ECC_LOW, "Test");
const uint8_t myB[qrcode.size]={qrcode.modules};
printer.printBitmap(50,50,myB,false);
qrcode.modules is the bytes of qrcode
it prints as shown in picture attached ... and its not qrcode !