Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not scan qr code image #43

Open
hiepnvna opened this issue Aug 13, 2024 · 0 comments
Open

Not scan qr code image #43

hiepnvna opened this issue Aug 13, 2024 · 0 comments

Comments

@hiepnvna
Copy link

hiepnvna commented Aug 13, 2024

i can't scan qr
img_v3_02dn_87107f17-aaed-4e16-9c37-752a85c533hu
tft.fillScreen(TFT_WHITE);
QRCode qrcode;
uint8_t qrcodeData[qrcode_getBufferSize(3)];
qrcode_initText(&qrcode, qrcodeData, 3, 0, "00020101021138530010A0000007270123000697044101099270995700208QRIBFTTA53037045802VN6304FABE");
uint8_t qrSize = 8;
uint16_t qrPixelSize = qrcode.size * qrSize;
uint8_t qrStartX = (320 - qrPixelSize - 12) / 2;
uint8_t qrStartY = 80;
for (uint8_t y = 0; y < qrcode.size; y++)
{
for (uint8_t x = 0; x < qrcode.size; x++)
{
if (qrcode_getModule(&qrcode, x, y))
{
tft.fillRect(x * qrSize + qrStartX, y * qrSize + qrStartY, qrSize, qrSize, TFT_BLACK);
}
else
{
tft.fillRect(x * qrSize + qrStartX, y * qrSize + qrStartY, qrSize, qrSize, TFT_WHITE);
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant