donny681 / ESP32_CAMERA_QR

Apache License 2.0
628 stars 226 forks source link

Error 0x20001 with TTGO T-Camera ESP32 #22

Open enricodente opened 5 years ago

enricodente commented 5 years ago

I am trying to get QR Code scan working with the TTGO T-Camera ESP32, which is a dev board with embedded OV2640.

I couldn't find a way to make it work with this repository, it always gives me the 0x20001 error, meaning that there is no communication at all.

The board works fine, for example I tested it with the standard Arduino example (File->Examples->ESP32->Camera->CameraWebServer) and after just setting up the right pinout I can run it with no issues. The same does not happen with ESP IDF, I believe it has something to do with the reset line or the powerdown line, but I also tried to initialize them as GPIO outputs and fix them respectively to high (RST) and low (PWDN), it did not help. Powerdown is not even handled by the camera.h driver attached to this repository (it should be pin 26).

Here is the config I am using into the sdkconfig file: CONFIG_D0=5 CONFIG_D1=14 CONFIG_D2=4 CONFIG_D3=15 CONFIG_D4=18 CONFIG_D5=23 CONFIG_D6=36 CONFIG_D7=39 CONFIG_XCLK=32 CONFIG_PCLK=19 CONFIG_VSYNC=27 CONFIG_HREF=25 CONFIG_SDA=13 CONFIG_SCL=12 CONFIG_RESET=2 CONFIG_QR_RECOGNIZE=y

And this is the board schematic diagram: https://github.com/Xinyuan-LilyGO/esp32-camera-bme280/blob/master/schematic/OV2640_V05.pdf

Do you have any hint about this issue? I2C lines are pulled up by schematic, I cannot check with multimeter but they should be populated (and the Arduino sketch runs). I also tried to pull them up via internal pull ups, but nothing changes.

donny681 commented 5 years ago

Please check whether the camera connect to the board well.