Skip to content

Commit 897b7a2

Browse files
author
Owen
committed
checkpoint
1 parent 5edf1be commit 897b7a2

File tree

1 file changed

+37
-19
lines changed

1 file changed

+37
-19
lines changed

README.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
11
# Espressives ESP32-CAM example revisited.
22
## Taken from the ESP examples, and modified for reality
3-
This sketch is a extension/expansion/rework of the 'official' ESP32 Camera example sketch from Expressif:
3+
This sketch is a extension/expansion/rework of the 'official' ESP32 Camera example sketch from Espressif:
44
https://github.com/espressif/arduino-esp32/tree/master/libraries/ESP32/examples/Camera/CameraWebServer
5-
- The example they have is nice, but a bit incomprehensible and hard to modify as supplied. It is very focused on showing off the face recognition capabilities, and forgets the 'webcam' part.
5+
- The example they have is nice, but a bit incomprehensible and hard to modify as supplied. It is very focused on showing off the face recognition capabilities, and forgets the 'webcam' part.
6+
- There are many other variants of a webcam server for these module sonline, but most are created for a specific scenario and not good for general, casual, webcam use.
67

78
I believe this expanded example is more useful for those users who wish to set up a simple ESP32 based webcam using the cheap(ish) modules freely available online. Especially the AI-THINKER board:
8-
https://wiki.ai-thinker.com/esp32-cam
99

10-
### Also:
10+
### AI-THINKER ESP32-CAM vs Other Modules:
11+
I have four of the AI-THINKER boards, so the descriptions below are for that board. But I took care to leave the default definitions and controls for other boards in the example intact. You may need to adjust the programming method to suit the your board, look for examples online.
12+
For some other good examples and information on ESP32 based webcams I also recommend the sketches here:
1113
https://github.com/raphaelbs/esp32-cam-ai-thinker
14+
The AI thinker wiki can be quite informative, when run through an online translator and read sensibly:
15+
https://wiki.ai-thinker.com/esp32-cam
16+
17+
## Setup:
18+
* For programming you will need a suitable development environment, I use the Arduino IDE, but this code should work in the Espressif development environment too.
19+
* Follow [This Guide](https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md) to set up the Espressif Arduino core in the IDE.
20+
* The AI-THINKER board requires use of an external **3.3v** serial adapter to program; I use a 'FTDI Friend' adapter, for more about this read AdaFruits excellent [FTDI Friend guide](https://learn.adafruit.com/ftdi-friend).
21+
* Be careful not to use a 5v serial adapter since this will damage the ESP32.
22+
### Wiring
23+
Is pretty simple, see the diagram below.
24+
![](http://)
25+
* Connect the RX line from the serial adapter to the TX pin on ESP32
26+
* The adapters TX line goes to the ESP32 RX pin
27+
* The GPIO0 pin of the ESP32 must be held LOW (to ground) when the unit is powered up to allow it to enter it's programming mode. This can be done with simple jumper cable connected at poweron, fitting a switch for this is useful if you will be reprogramming a lot.
28+
* You must supply 5v to the ESP32 in order to power it during programming, the FTDI board can supply this.
29+
30+
### Config
31+
32+
### Programming
33+
Assuming you are using the latest Espressif Arduino core the AI-THINKER board will appear in the ESP32 Arduino section of the boards list.
34+
![](http://)
35+
Compile and upload the code from the IDE, and open the serial monitor; you should see the board start, begin connecting to the wifi, connect and then report the IP address it has been assigned.
36+
Go to the URL given in the serial output, the web UI should appear with the settings open. Click away!
1237

1338
## Specifics:
1439
The basic example is extended to allow control of a high power LED FlashLamps like the ones used on mobile phones, which are present on some modules. It can also blink a status LED to show when it connects to WiFi.
@@ -21,20 +46,13 @@ I have left all the Face Recognition code untouched, it works, and with good lig
2146

2247
The web UI has had minor changes to add the lamp control (only when enabled), I also made the 'Start Stream' and 'Snapshot' controls more prominent, and added feedback of the camera name + firmware.
2348

24-
## Use:
25-
* arduino IDE, espressive toolchain, board
26-
* wiring
27-
* programming
28-
29-
#### Config
30-
31-
## Plans
32-
* SD/TF card; store snapshots etc.
33-
* Wifi, captive portal for setup and fallback, better disconnect/reconnect behaviour.
34-
* Remove face rcognition to savee a Mb+ of code space and then implement over the air updates.
35-
* Combine current split html pages (one per camera type) into one which adapts as needed.
36-
3749
## Notes:
3850
* I only have AI-THINKER modules with OV2640 camera installed; so I have only been able to test with this combination. I have attempted to preserve all the code for other boards and the OV3660 module, and I have merged all changes for the WebUI etc, but I cannot guarantee operation for these.
39-
* devboard
40-
* cases on Thingieverse
51+
* I created a small board with a handy switch for power, a pushbutton for the GPIO0 programming switch, and a socket for the AI-THINKER board. This proved very useful for development work.
52+
* I found some excellent [cases on Thingieverse](https://www.thingiverse.com/thing:3708345)
53+
54+
## Plans
55+
* Improve Wifi, add a captive portal for setup and fallback, better disconnect/reconnect behaviour.
56+
* The module has a SD/TF card slot; this is currently unused, but I would like to add the ability to store snapshots; recording Video at low resolution may be possible, but the card interface is too slow for HD video as far as I know.
57+
* Remove face rcognition to save a Mb+ of code space and then implement over the air updates.
58+
* Combine current split html pages (one per camera type) into one which adapts as needed.

0 commit comments

Comments
 (0)