Giter Site home page Giter Site logo

0015 / esp32-ov5640-af Goto Github PK

View Code? Open in Web Editor NEW
102.0 7.0 24.0 219 KB

Library for ESP32 to use OV5640's autofocus function

Home Page: https://youtube.com/thatproject

License: MIT License

C++ 9.23% C 90.77%
esp32 ai-thinker-boards ov5640 arduino-library thatproject autofocus

esp32-ov5640-af's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-ov5640-af's Issues

AF-VCC powering

It is more correct to connect the autofocus module power to 2.8V.
There is an appropriate regulator on the ESP32CAM board.

The return type of ov5640.getFWStatus() is incorrect.

// OV5640_Console_Test.ino:72
  uint8_t rc = ov5640.getFWStatus();
  Serial.printf("FW_STATUS = 0x%x\n", rc);
  if (rc == -1) {  // -1 is out of range for uint8_t
  ...
// ESP32_OV5640_AF.cpp:87
uint8_t OV5640::getFWStatus() {
  if (!isOV5640) return -1;  // -1 is out of range for uint8_t
  uint8_t rc = sensor->get_reg(sensor, OV5640_CMD_FW_STATUS, 0xff);
  return rc;
}

Progress on manual focus?

Thank you for this wonderful project. I'm wondering if there are particular challenges with enabling manual focus. It should consist of sending a command via i2c to the proper register right? Are there registers for setting the position of the lens that are known?

Question on Autofocus

I haven't tried this yet - but it looks excellent!

const unsigned char OV5640_AF_Config[] =

Do you know what this microcode actually does? Is there source code that could be modified? Or an 5640 microcode programming manual?

Is it your understanding that the esp32-camera driver does not have that auto-focus microcode?
I thought it did, but as I look at it right now, it is not there, so the standard esp32 drivers must leave it in infinity focus mode.

I've seen a few similar things like this, but never put the time to understand it.

https://www.its304.com/article/hwytree/118992955
https://gitlab.com/k2wl/g2_kernel/-/blob/4472ce5be96571f65dcfad53a6aa32c58d5553bd/drivers/media/video/msm/ov5640.h#L1046

esp32 wroom

Hi
Will your lib works with esp32 wroom without psram ?
Thanks a lot!

Use in conjuction with Espressif esp32-camera esp_camera_init?

Fantastic work on getting autofocus to work on the ESP32 !

I'm using the Espressif esp32-camera esp_camera_init function to initialize my camera. Question is when do I call your ov5640.focusInit() function? I see that your focusInit() resets the camera and loads the autofocus firmware to the camera and this is going to cause havoc if focusInit() is called after esp_camera_init ?

My camera init code looks something like this:

  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    return;
  }

Use OV5640 with ESP-WROVER-KIT?

Hi,
I want to use ESP-WROVER-KIT with the Waveshare OV5640 board. I installed the ESP32-OV5640-AF library, but:

  1. The CameraWebServer example does not support OV5640
  2. The OV5640_Console_Test is for ESP32 AI-THINKER Board only, it seems.

How can I use ESP-WROVER-KIT with the Waveshare OV5640 cam board?

Thanks.

Auto focus doesnt work

Hello,

I tried replicating the result on my esp32 cam, but the auto focus function doesn't work. I bought a slightly different version of the ov5640 model, which has Auto-VDD at pin #23 instead of #24, and I did connect that pin to the 3V power pin from the board accordingly. I ran the unmodified example code you provided, and the monitor console did indeed show the camera was focusing and focused. However, I didn't hear any sounds from the motor while the camera was focusing, nor did I get a clear picture when I took a shot with it. Any thoughts on what could cause it? I tried it on several camera modules from different vendors, same result.

This is the one I bought.

Screenshot 2022-07-29 144105

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.