Doc options (#42)
* Discreet camera option settings defaults, commented out by default, and a note about them in the readme
This commit is contained in:
parent
387dc078c9
commit
e28eadd66d
18
README.md
18
README.md
|
@ -1,12 +1,18 @@
|
|||
# ESP32-CAM example revisited. <span title="Master branch build status">[](https://travis-ci.org/github/easytarget/esp32-cam-webserver)</span> <span title="ESP EYE"></span>
|
||||
|
||||
## Taken from the ESP examples, and modified for reality
|
||||
## Taken from the ESP examples, and expanded
|
||||
This sketch is a extension/expansion/rework of the 'official' ESP32 Camera example sketch from Espressif:
|
||||
|
||||
https://github.com/espressif/arduino-esp32/tree/master/libraries/ESP32/examples/Camera/CameraWebServer
|
||||
|
||||
- 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.
|
||||
- There are many other variants of a webcam server for these modules online, but most are created for a specific scenario and not good for general, casual, webcam use.
|
||||
But expanded with:
|
||||
* More options for default network and camera settings
|
||||
* Control of on-board lamps, view rotation in the browser
|
||||
* Dedicated standalone stream viewer
|
||||
* Lots of minor fixes and tweaks
|
||||
|
||||
The original example is 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.
|
||||
* There are many other variants of a webcam server for these modules online, but most are created for a specific scenario and not good for general, casual, webcam use.
|
||||
|
||||

|
||||
|
||||
|
@ -49,7 +55,9 @@ Is pretty simple, You just need jumper wires, no soldering really required, see
|
|||
|
||||
By default the sketch assumes you have an AI-THINKER board, it creates an AccessPoint called `ESP32-CAM-CONNECT` and with the password `InsecurePassword`; connect to that and then browse to [`http://192.168.4.1/`](http://192.168.4.1/). This is nice and easy for testing and demo purposes.
|
||||
|
||||
To make a permanent config for a different board, or with your home wifi settings etc. copy (or rename) the file `myconfig.sample.h` in the sketch folder to `myconfig.h`
|
||||
To make a permanent config for a different board, or with your home wifi settings etc. copy (or rename) the file `myconfig.sample.h` in the sketch folder to `myconfig.h`
|
||||
|
||||
Additional boot-time changes to other camera properties can be made in the main sketch file; see the comments [around line 253](https://github.com/easytarget/esp32-cam-webserver/blob/doc-options/esp32-cam-webserver.ino#L253).
|
||||
|
||||
You can now set a camera name, board model, wifi settings and some other defaults in that file. And because this is your private copy it will not get overwritten if you update the main sketch!
|
||||
|
||||
|
@ -75,6 +83,8 @@ The WiFi details can be stored in an (optional) header file to allow easier code
|
|||
|
||||
The compressed and binary encoded HTML used in the example has been unpacked to raw text, this makes it much easier to access and modify the Javascript and UI elements. Given the relatively small size of the index page there is very little benefit from compressing it.
|
||||
|
||||
The streamviewer, lamp control, and all the other new features have been added. I have tried to retain the basic structure of the original example,extending where necesscary.
|
||||
|
||||
I have left all the Face Recognition code untouched, it works, and with good lighting and camera position it can work quite well. But you can only use it in low-resolution modes, and it is not something I will be using.
|
||||
|
||||
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.
|
||||
|
|
|
@ -250,6 +250,33 @@ void setup() {
|
|||
s->set_framesize(s, FRAMESIZE_SVGA);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Add any other defaults you want to apply at startup here:
|
||||
* uncomment the line and set the value as desired (see the comments)
|
||||
*/
|
||||
//s->set_brightness(s, 0); // -2 to 2
|
||||
//s->set_contrast(s, 0); // -2 to 2
|
||||
//s->set_saturation(s, 0); // -2 to 2
|
||||
//s->set_special_effect(s, 0); // 0 to 6 (0 - No Effect, 1 - Negative, 2 - Grayscale, 3 - Red Tint, 4 - Green Tint, 5 - Blue Tint, 6 - Sepia)
|
||||
//s->set_whitebal(s, 1); // 0 = disable , 1 = enable
|
||||
//s->set_awb_gain(s, 1); // 0 = disable , 1 = enable
|
||||
//s->set_wb_mode(s, 0); // 0 to 4 - if awb_gain enabled (0 - Auto, 1 - Sunny, 2 - Cloudy, 3 - Office, 4 - Home)
|
||||
//s->set_exposure_ctrl(s, 1); // 0 = disable , 1 = enable
|
||||
//s->set_aec2(s, 0); // 0 = disable , 1 = enable
|
||||
//s->set_ae_level(s, 0); // -2 to 2
|
||||
//s->set_aec_value(s, 300); // 0 to 1200
|
||||
//s->set_gain_ctrl(s, 1); // 0 = disable , 1 = enable
|
||||
//s->set_agc_gain(s, 0); // 0 to 30
|
||||
//s->set_gainceiling(s, (gainceiling_t)0); // 0 to 6
|
||||
//s->set_bpc(s, 0); // 0 = disable , 1 = enable
|
||||
//s->set_wpc(s, 1); // 0 = disable , 1 = enable
|
||||
//s->set_raw_gma(s, 1); // 0 = disable , 1 = enable
|
||||
//s->set_lenc(s, 1); // 0 = disable , 1 = enable
|
||||
//s->set_hmirror(s, 0); // 0 = disable , 1 = enable
|
||||
//s->set_vflip(s, 0); // 0 = disable , 1 = enable
|
||||
//s->set_dcw(s, 1); // 0 = disable , 1 = enable
|
||||
//s->set_colorbar(s, 0); // 0 = disable , 1 = enable
|
||||
|
||||
// Feedback that hardware init is complete and we are now attempting to connect
|
||||
Serial.println("Wifi Initialisation");
|
||||
flashLED(400);
|
||||
|
|
Loading…
Reference in New Issue