From a39db4c29bb34d5afb3ccc3d47136795d2d265de Mon Sep 17 00:00:00 2001 From: Alberto Casas Ortiz Date: Tue, 8 Oct 2019 08:58:25 +0200 Subject: [PATCH] Fixed some errors in example code of readme file. --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d6b8b23..b3e27ef 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,15 +48,15 @@ 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) { - Serial.print("**"); - } else { - Serial.print(" "); - } - } - Serial.print("\n"); +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(" "); + } + } + Serial.print("\n"); } ```