Today I tested the ESP32 camera with Mega. I installed a HW 613 switching power supply (for ESP32 only) that allows the output voltage to be turned on and off via the arduino. It works well, it turns the camera on and after a pause it turns off again and so on and on. But I have problems with the application on mobile and PC. The transmission turns on and off, but re-transmission is possible only after stopping and restarting the application.
Inappropriate application? Can it be solved by modifying the program?
I do not know what do with it.
I assume your ESP32 CAM is the "AI Thinker Board", the common method of video streaming is to let the ESP32 acting as a web server. When you start the server, you need to browse the ip address (URL) of this server in order to load the root page into your PC and start a javascript for making live the web page (such as loading the video streaming.)
I assumed you use this technique. If you turned off you ESP32, it may:
Stopped the streaming connection
Having the chance to lost the assigned IP
For the case of 1), your web page should be reloaded in order to remake the connection. Thus can be done manually or by the javascript itself.
If your javascript has implemented some heart beat check form the server (say receiving some constant time interval of messages from the server), web page can be reloaded if the heart beat stopped, by using the location.reload() method
Yes, I only use ESP as a normal method of streaming video through a web server.
I'm a beginner so I don't know these special features yet.
How to use location.reload() method ?
Thanks
But I would like to remind you that the newest sample code for camera streaming of ESP32 AI Thinker inside the Arduino IDE had made all the web page content compressed or zipped you may need more technique to unzip andzip again. (The try to save memory, but at the cost of more technical knowledge"
You can still use back the past method using a string to store the whole contents of the web page.
You can find more sample code like this from the web, by searching keyword "esp32, cam, streaming, webserver"....etc.
About the javascript, it is still a simple language/ method to me to communicate and learn easily with a PC or mobile though wifi or network.
Of course, you can directly write in C to handle the API functions for network communications and use, e.g. Android with java or Kotin for the other side.
C# is also a good choice with the free Visual Studio for Community.