🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Please Help: Has anybody had success with the ESP32CAM on Arduino?

    Units
    7
    13
    25.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ajb2k3A
      ajb2k3 @LURK_
      last edited by

      @lurk_ said in Please Help: Has anybody had success with the ESP32CAM on Arduino?:

      @marka2 Good day! If I understand you correctly, try to put the firmware on this manual: https://www.youtube.com/watch?v=q7Z_XnBYFhY
      No, the ESP32CAM is
      alt text

      UIFlow, so easy an adult can learn it!
      If I don't know it, be patient!
      I've ether not learned it or am too drunk to remember it!
      Author of the WIP UIFlow Handbook!
      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

      L 1 Reply Last reply Reply Quote 0
      • L
        LURK_ @ajb2k3
        last edited by

        @ajb2k3 I have the same camera and I used this tape to use the camera, given the small edits I have everything working without problems )))

        1 Reply Last reply Reply Quote 0
        • M
          marka2 @LURK_
          last edited by

          @lurk_ Yes. Look at the video, the code says you must have PSRAM. Why do I need PSRAM in the case of Arduino? Anybody know?

          L ajb2k3A 2 Replies Last reply Reply Quote 0
          • L
            LURK_ @marka2
            last edited by LURK_

            @marka2 Using the example ESP32CAM in the camera settings CAMERA_MODEL_M5STACK_PSRAM I changed the initialization of the foam #define Y2_GPIO_NUM from 32 to 17 and installed the firmware. It worked for me. Let me know if You do not work and what will be the error.
            For streaming video memory is enough, facial recognition modules do not work correctly, the reason I think lies in the lack of memory, but I just needed a camera for the project and I do not use these features.

            R 1 Reply Last reply Reply Quote 1
            • ajb2k3A
              ajb2k3 @marka2
              last edited by

              @marka2 said in Please Help: Has anybody had success with the ESP32CAM on Arduino?:

              @lurk_ Yes. Look at the video, the code says you must have PSRAM. Why do I need PSRAM in the case of Arduino? Anybody know?

              PSram is only available in the later model cameras if you have the bare PCB or the Model A camera then psram is not available.

              UIFlow, so easy an adult can learn it!
              If I don't know it, be patient!
              I've ether not learned it or am too drunk to remember it!
              Author of the WIP UIFlow Handbook!
              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

              1 Reply Last reply Reply Quote 0
              • R
                romain145 @LURK_
                last edited by

                @lurk_ said in Please Help: Has anybody had success with the ESP32CAM on Arduino?:

                @marka2 Using the example ESP32CAM in the camera settings CAMERA_MODEL_M5STACK_PSRAM I changed the initialization of the foam #define Y2_GPIO_NUM from 32 to 17 and installed the firmware. It worked for me. Let me know if You do not work and what will be the error.
                For streaming video memory is enough, facial recognition modules do not work correctly, the reason I think lies in the lack of memory, but I just needed a camera for the project and I do not use these features.

                I confirm Lurk's comment: by changing Y2_GPIO_NUM from 32 to 17 this allowed the camera to work on my M5STACK ESP32CAM (the one from the picture).
                Note that now it is included in the CameraWebServer example: https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino
                I used #define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM and it worked first try!
                Hope that this helps someone!

                1 Reply Last reply Reply Quote 1
                • H
                  hajekv
                  last edited by

                  I have trouble getting this camera working with custom firmware. Original firmware worked ok.
                  When I flash CameraWebServer example, with #define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM used, it fails with:

                  E (124) cam_hal: cam_dma_config(271): frame buffer malloc failed
                  E (124) cam_hal: cam_config(355): cam_dma_config failed
                  E (124) camera: Camera config failed with error 0xffffffff
                  Camera init failed with error 0xffffffff
                  

                  I've double-checked the pin are set according to the M5Stack documentation.

                  I'm using ESP32 Arduino SDK 2.0.0. There is no special board definition for M5Stack ESP32-CAM, I set classic ESP32 board, DEVKIT V1.
                  Does anyone know what could be a problem?

                  V 1 Reply Last reply Reply Quote 0
                  • V
                    Valter Fukuoka @hajekv
                    last edited by

                    @hajekv,

                    hi,
                    I also experienced the same kind of error trying a M5Stack UnitCam (no PSRAM), using Arduino IDE Platform.

                    Here is the error msg:

                    E (127) cam_hal: cam_dma_config(280): frame buffer malloc failed
                    E (127) cam_hal: cam_config(364): cam_dma_config failed
                    E (127) camera: Camera config failed with error 0xffffffff
                    Camera init failed with error 0xffffffff
                    

                    I found that there is a bug on the "esp32-camera" software, which is preventing the code to correctly work on devices WITHOUT PSRAM!
                    See the issue here:
                    https://github.com/espressif/esp32-camera/issues/334

                    In the case of the UnitCam, I was able to confirm that going back to 2021/FEB code (esp32-camera), it works perfectly, without problems, on ESP-IDF Dev Framework...
                    So, now I have it working OK.

                    I believe that this is the reason why the Arduino IDE Framework also fails for the UnitCam (and also, for any other CAM without PSRAM), since it is probably using the latest version of the code, which have the bug in it...

                    I don't know how to "install" the old version of the esp32-camera on the Arduino IDE, besides I am asking myself if this is possible/easy to do, because I do have interest in using it with Arduino IDE as well...

                    I will post more infos regarding the UnitCam and this bug later...

                    The bug itself does not seems to be difficult to resolve, so, hopefully the solution will come in the next few days...

                    So, the example inside the Arduino IDE and all the other tutorials/samples that exist on the Internet, probably WORKS OK on devices without PSRAM... what is causing the trouble is the bug introduced this year (2021) on the code, code that was OK in the past months/years...

                    Hope it can help,
                    Valter

                    V 1 Reply Last reply Reply Quote 0
                    • V
                      Valter Fukuoka @Valter Fukuoka
                      last edited by

                      @valter-fukuoka,

                      About old versions of ESP32-Arduino on Arduino IDE...

                      Yes, it is possible and EASY to install old versions...

                      This official guide describe how to install the current version:
                      https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html

                      The only change needed is to download a diffent/old version of the code...

                      I did a test going back to 2021/FEB/23, and it WORKS!
                      (This is the same day I had choosed to test ESP32-camera software for the ESP-IDF,
                      so, I was hoping that it was OK for Arduino IDE setup as well...)

                      Besides this bug being just a temporary stuff, I will document better how to use old versions of code, for IDF and for Arduino IDE, because there are probably MANY situations in which we would like to use/test different versions other than the current version...

                      Regards,
                      Valter

                      1 Reply Last reply Reply Quote 0
                      • M
                        mrmike
                        last edited by

                        I have been trying to get just the simple camera web server on a M5Cam module I recently bought. Being new to arduino itself may be the issue. I have tried numerous board configurations, and tried to follow the direction I found on the camera. I have not found an answer to which board to use in the programmer, so I tried M5Staack-Core-esp32 (and I think all the other M% boards) but not having any success. 0_1637865683399_camera1.JPG 0_1637865692552_camera2.jpg
                        Any usgesstions would be appriciated.

                        1 Reply Last reply Reply Quote 0
                        • V
                          Valter Fukuoka
                          last edited by

                          For M5Stack UNITCAM and ESP-IDF Programming Framework, I did post infos here:
                          https://forum.m5stack.com/topic/3788/unitcam-idf-use-many-versions-of-code

                          Next, I will show how to do the same for Arduino IDE Framework...

                          Valter

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post