diff --git a/README.md b/README.md index d6b8b23..5a21b8a 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ API QRCode qrcode; // Allocate a chunk of memory to store the QR code -uint8_t qrcodeBytes[qrcode_getBufferSize()]; +uint8_t qrcodeBytes[qrcode_getBufferSize(3)]; qrcode_initText(&qrcode, qrcodeBytes, 3, ECC_LOW, "HELLO WORLD"); ``` @@ -48,9 +48,9 @@ The following example prints a QR code to the Serial Monitor (it likely will not be scannable, but is just for demonstration purposes). ```c -for (uint8 y = 0; y < qrcode.size; y++) { - for (uint8 x = 0; x < qrcode.size; x++) { - if (qrcode_getModule(&qrcode, x, y) { +for (uint8_t y = 0; y < qrcode.size; y++) { + for (uint8_t x = 0; x < qrcode.size; x++) { + if (qrcode_getModule(&qrcode, x, y)) { Serial.print("**"); } else { Serial.print(" ");