logo elektroda
logo elektroda
X
logo elektroda

Where can I find a sketch giving the Esp32 CAM to the viewer/app?

pier 1101 11
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19429108
    pier
    Level 24  
    Hello.
    I wanted to use this webcam for simple viewing over a local WiFi network. The question is do you know where to get a reliable sketch that will allow viewing from this webcam in a browser or some application? All the ones I've tested so far either have the default lowest resolution set or they stutter for no reason.
  • ADVERTISEMENT
  • #2 19429271
    khoam
    Level 42  
    Have you tested the code from this project: Link
  • #3 19429301
    pier
    Level 24  
    khoam wrote:
    Have you tested the code from this project: Link
    .

    Rather not. I'll try
  • ADVERTISEMENT
  • #4 19432351
    pier
    Level 24  
    I don't know how to use this sketch. Right on startup it howls that files such as esp_camera.h are missing. Adding this file does not change anything.
  • #5 19432646
    khoam
    Level 42  
    Code: C / C++
    Log in, to see the code
    This means you need a board with ESP32-WROVER, with additional PSRAM if you want to achieve good resolution.

    Other than that, the "sketch" compiles without any problems:
    Code: Bash
    Log in, to see the code
    .
    I did not create a custom myconfig.h file. In the flash partition settings it is best to use the "Huge APP" option. - The resulting code is almost 3 MB.
  • ADVERTISEMENT
  • #6 19432744
    inot
    Level 37  
    The same example (link from post 2) can be loaded using the Arduino.
    Link .
  • #7 19434728
    pier
    Level 24  
    Something compiles there but this time it stalls with an error at this point:
    Where can I find a sketch giving the Esp32 CAM to the viewer/app? .

    Khoam you Have partition options when compiling for Ai_Thinker ESP32-CAM?
  • #9 19434877
    khoam
    Level 42  
    pier wrote:
    Something there compiles but this time it gets an error at this point:
    .
    The file esp_camera.h should not be in this project. This is a library file from Core for ESP32. You have probably copied it and hence the error about the double type declaration now appears.

    pier wrote:
    You have partition options when compiling for Ai_Thinker ESP32-CAM?
    .
    For this board there is no such option and it does not matter. The program also compiles seamlessly for "AI Thinker ESP32-CAM":
    Code: C / C++
    Log in, to see the code
    .

    Added after 4 [minutes]:

    What version of Core for ESP32 do you have installed in the Arduino IDE. In my case it is 1.0.6.
  • ADVERTISEMENT
  • #10 19434921
    pier
    Level 24  
    khoam wrote:
    pier wrote:
    Something there compiles but this time it gets an error at this location:
    .
    The file esp_camera.h should not be in this project. This is a library file from Core for ESP32. You have probably copied it and hence the error about the double type declaration now appears.

    pier wrote:
    You have partition options when compiling for Ai_Thinker ESP32-CAM?114bb1993 .
    For this board there is no such option and it does not matter. The program also compiles seamlessly for "AI Thinker ESP32-CAM":
    Code: C / C++
    Log in, to see the code
    .

    Added after 4 [minutes]:

    What version of Core for ESP32 do you have installed in the Arduino IDE. In my case it is 1.0.6.
    .

    Khoam as usual You are right. Now everything is compiling.
    Thanks.

    I think this board of mine is some kind of screwed up. After uploading it displays my page nicely but the image is missing. In the serial monitor I have the message:
    [E][camera.c:1483] esp_camera_fb_get(): Failed to get the frame on time!
    I've been looking for a solution because a lot of people are complaining about this but nothing sensible.
    Sometimes after a fart of tries the camera will catch on and it works.
  • #11 19435564
    khoam
    Level 42  
    pier wrote:
    This board of mine is probably banged up somehow.
    .
    More likely the camcorder is of poor quality.

    pier wrote:
    I searched for a solution because a lot of people are complaining about this but nothing sensible is available.
    .
    You didn't write what specifically you tried, but I suggest changing one parameter in the file esp32-cam-webserver.ino , this involves changing the value of config.xclk_freq_hz from 20000000 to 10000000 .
    Code: C / C++
    Log in, to see the code
    .
    As a test, the value of config.xclk_freq_hz can also be reduced to 5000000.

    I repeat the question: what version of Core for ESP32 do you have installed in the Arduino IDE?

    Added after 2 [minutes]: .

    There is also the possibility that the USB power supply is not current efficient enough for this camera module. This is also worth verifying.
  • #12 19435611
    pier
    Level 24  
    Core version as you have 1.0.6.
    I tried adding another camera configuration but then it didn't detect it.
    I also thought about the power supply. I'll check it right away.

    Added after 20 [minutes]: .

    Neither changing the frequency nor a better power supply have any effect.

    But the strange thing is that until two days ago on basic sketch this camera was working.

    On the basic software it no longer works either.

Topic summary

The discussion revolves around finding a reliable sketch for the ESP32 CAM to enable webcam viewing over a local WiFi network. Users report issues with existing sketches, such as low resolution and stuttering video. Suggestions include ensuring the correct board selection (ESP32 AI Thinker) with PSRAM enabled for high-resolution modes. Users also encounter errors related to missing files like esp_camera.h and issues with camera frame retrieval. Recommendations include adjusting the xclk_freq_hz parameter in the sketch and checking power supply quality. Despite troubleshooting, some users still face persistent issues with camera functionality.
Summary generated by the language model.
ADVERTISEMENT