anunpanya / ESP8266_QRcode

102 stars 53 forks source link

QR code looks like a jumbled mess #12

Open Brayden1000 opened 4 years ago

Brayden1000 commented 4 years ago

Hi,

I am trying to print a QR code onto an SSD1306 128x64 display but I'm having some issues, the QR code is a jobbled mess. it doesn't look like a QR code at all. I am just using the base example code:

Code:

#include <qrcode.h>
#include <SSD1306.h>

SSD1306  display(0x3c, SDA, SCL);
QRcode qrcode (&display);

void setup() {

    Serial.begin(115200);
    Serial.println("");
    Serial.println("Starting...");

    display.init();
    display.clear();
    display.display();

    // enable debug qrcode
    // qrcode.debug();

    // Initialize QRcode display using library
    qrcode.init();
    // create qrcode
    qrcode.create("Hello world.");

}

void loop() { }

Here is the QR code: https://imgur.com/a/WMiXy87

Thanks all!

psilonux commented 3 years ago

I experienced a similar issue. The pixels didn't scale to the resolution of the OLED screen I used (a ST7789). I manage to fix it by changing some of the code. I will try to push the changes I made to this repo (but I'm a complete git noob..).