alvarowolfx / esp32qrcodereader Goto Github PK
View Code? Open in Web Editor NEWA library to read QR Codes using an ESP32 with a camera module.
License: MIT License
A library to read QR Codes using an ESP32 with a camera module.
License: MIT License
Hi,
would be great if you lib could also use the camera of the Xiao ESP32S3 Sense.
Maybe anyone can add this?
THX
Hey all them who has a lot of issues with this package, but couldn't find any alternative. Will this repo be continued to be supported?I don't have enough knowledge in C/C++ to fix the issues came with 4 years(currently) after the latest support.
@alvarowolfx is it archive or not?
Is there any alternatives to this so I can use for on-run qr scanning?
Hi there,
Thanks for the great code, but I encountered a minor issue when using it with a ESP32-CAM board.
You can find the following lines below in the cpp. This will always be true even if ESP EYE is not used, as it is always defined in the header file. As this changes the pinMode, unwanted behaviour will occur if pin 13 and /or 14 are used. For us, it caused I2C on pin 13/14 to stop working due to the internal pullup that got enabled.
#if defined(CAMERA_MODEL_ESP_EYE)
pinMode(13, INPUT_PULLUP);
pinMode(14, INPUT_PULLUP);
#endif
Hello,
I don't found the ESP32QRCodeReader.h file in the scr folder.
I'm getting tons of missing functions, like psram, memcpy, free, and a zillion others when I try to compile my project. My platformio has lib_deps = alvarowolfx/ESP32QRCodeReader@^1.1.0
Errors look like this (many clipped from the end)
Compiling .pio\build\esp32cam\libc84\ESP32QRCodeReader\quirc\decode.c.o
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c: In function 'lifo_alloc':
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:20:23: warning: implicit declaration of function 'ps_malloc'; did you mean 'lifo_alloc'? [-Wimplicit-function-declaration]
ptr->data = (char *)ps_malloc(size * data_len);
^~~~~~~~~
lifo_alloc
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c: In function 'lifo_free':
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:36:5: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
free(ptr->data);
^~~~
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:36:5: warning: incompatible implicit declaration of built-in function 'free'
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:36:5: note: include '<stdlib.h>' or provide a declaration of 'free'
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:7:1:
+#include <stdlib.h>
#define CHAR_BITS (sizeof(char) * 8)
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:36:5:
free(ptr->data);
^~~~
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c: In function 'lifo_enqueue':
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:62:3: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len);
^~~~~~
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:62:3: warning: incompatible implicit declaration of built-in function 'memcpy'
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:62:3: note: include '<string.h>' or provide a declaration of 'memcpy'
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:7:1:
+#include <string.h>
#define CHAR_BITS (sizeof(char) * 8)
.pio/libdeps/esp32cam/ESP32QRCodeReader/src/openmv/collections.c:62:3:
memcpy(ptr->data + (ptr->len * ptr->data_len), data, ptr->data_len);
^~~~~~
What could I be doing wrong?
It didn't work when I changed the image size to 800*600.
Since the more complex QR codes cannot be recognized when the default image size is working, I tried to modify the image size, but it did not work
`ESP32QRCodeReader reader(CAMERA_MODEL_AI_THINKER,FRAMESIZE_QVGA);//320 * 240//Original
ESP32QRCodeReader reader(CAMERA_MODEL_AI_THINKER,FRAMESIZE_SVGA);//800 * 600//Modified
`
Is there any way to adjust the settings of the camera via your library? For example, increase brightness? I find that a large white and black qr code will scan. but anything small, or using a non standard color does not scan. I have some large codes that are a black/gray scale that won't scan. They scan fine with a iPhone, but that is obviously a much better camera.
Hello,
First of all I wanna say thanks for your work.
Question:
I would like to know if there is a known format of QR wich is best for being recogniced by your library.
I´m getting a lot of ECC errors (10 and 20 random chars qrs) using ESP32-CAM, it reads 1 every 25/30 tries.
Background:
I´m developing a small control system and there is no any fixed qr format I´m attached to, thats why I´m asking.
Maybe decreasing or increasing the L factor when generating the qrs?
I just need 2000 qrs that will be used with the app.
Any advice wellcome.
Thanks again.
Is it possible to initialize camera with some other format than GRAYSCALE for example JPEG or RGB and still make the reader work? Or is it possible to capture RGB picture and convert it to GRAYSCALE and feed that to the reader?
Hi~
Thank you for your library.
I managed to succeed making your library run in PlatformIO environment.
Then I'd like to know how to add library in Arduino IDE.
Can u advise me how to add library in arduino ide?
I googled how to add library to arduino ide then I tried but failed.
Thank you in advance.
#include <Arduino.h>
#include <ESP32QRCodeReader.h>
ESP32QRCodeReader reader(CAMERA_MODEL_AI_THINKER);
void onQrCodeTask(void *pvParameters){
struct QRCodeData qrCodeData;
while (true){
if (reader.receiveQrCode(&qrCodeData, 100)){
if (qrCodeData.valid){
Serial.println((const char *)qrCodeData.payload);
}
}
vTaskDelay(100 / portTICK_PERIOD_MS);
}
}
void setup(){
Serial.begin(115200);
reader.setup();
reader.beginOnCore(1);
xTaskCreate(onQrCodeTask, "onQrCode", 4 * 1024, NULL, 4, NULL);
}
void loop(){
delay(50);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.