ESP32-CAM wifi camera for <5$

derez

Expert
Licensed User
I got the esp32-cam board with ov2640 2MP camera from Aliexpress https://www.aliexpress.com/item/32992180149.html?spm=a2g0s.9042311.0.0.3b824c4d2rcSIa
I used this to work on it: https://randomnerdtutorials.com/esp32-cam-video-streaming-face-recognition-arduino-ide/
Tips:
Connect the board to 5V
For the camera use AI_THINKER line.
Use flash frequency 40 MHZ.

After uploading the arduino code disconnect the short between IO0 & GND, reset (or take out of power and reconnect), select tools/serial monitor and check the printout. You may see constant resets with messages about brownout or some other things, the important thing is to see the IP.
If you don't have resets - check the ip in a browser (chrome recommended) and play with the camera functions.
If you do have resets - disconnect from the PC and connect directly to power, then check in the browser.

The ports used are 80 for the control and 81 for streaming video. I wanted to be able to see the video from the internet outside of the local lan so I had to change the ports (not advised to port-forward 80).
the ports are defined in this file C:\Users\[username]\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\tools\sdk\include\esp_http_server\esp_http_server.h
I changed the port 80 in line 37 to another selected number . Port 81 is changed by the code to +1 the selected port. Now I added the board to the router with fixed IP (by its mac address) and with port-forwarding of the selected port to this ip.

After that change the video streaming does not work from the control page but you can see it by the address [IP]:[port+1]/stream

The pictures and video are nice and I get them by my phone, better when connected to wifi.
 
Last edited:
Top