2020-10-26 07:20:25 +08:00
|
|
|
/*
|
2020-09-09 08:57:37 +08:00
|
|
|
* Rename this example to 'myconfig.h' and fill in your details.
|
2020-10-26 07:20:25 +08:00
|
|
|
*
|
2020-09-09 08:57:37 +08:00
|
|
|
* The local config is in the '.gitignore' file, which helps to keep details secret.
|
|
|
|
*/
|
2019-11-15 00:01:37 +08:00
|
|
|
|
2020-08-24 03:49:10 +08:00
|
|
|
|
2020-10-29 15:13:08 +08:00
|
|
|
/* Give the camera a name for the web interface */
|
2020-08-24 03:49:10 +08:00
|
|
|
#define CAM_NAME "ESP32 camera server"
|
2020-08-22 00:36:36 +08:00
|
|
|
|
2020-09-09 08:57:37 +08:00
|
|
|
|
|
|
|
/*
|
2020-10-29 15:13:08 +08:00
|
|
|
* WiFi Settings
|
|
|
|
*
|
|
|
|
* For the simplest connection to an existing network
|
|
|
|
* just replace your ssid and password in the line below.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct station stationList[] = {{"my_ssid","my_password", true}};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* You can extend the stationList[] above with additional SSID+Password pairs
|
|
|
|
|
|
|
|
struct station stationList[] = {{"ssid1", "pass1", true},
|
|
|
|
{"ssid2", "pass2", true},
|
|
|
|
{"ssid3", "pass3", false}};
|
|
|
|
|
2021-12-16 23:10:45 +08:00
|
|
|
* Note the use of nested braces '{' and '}' to group each entry, and commas ',' to separate them.
|
2020-09-09 08:57:37 +08:00
|
|
|
*
|
2020-10-29 15:13:08 +08:00
|
|
|
* The first entry (ssid1, above) in the stationList is special, if WIFI_AP_ENABLE has been uncommented (below)
|
|
|
|
* it will be used for the AccessPoint ssid and password. See the comments there for more.
|
2020-10-14 19:40:08 +08:00
|
|
|
*
|
2020-10-29 15:13:08 +08:00
|
|
|
* The 'dhcp' setting controls whether the station uses DHCP or static IP settings; if in doubt leave 'true'
|
|
|
|
*
|
2021-12-16 23:10:45 +08:00
|
|
|
* You can also use a BSSID (eg: "2F:67:94:F5:BB:6A", a colon separated mac address string) in place of
|
2020-10-29 15:13:08 +08:00
|
|
|
* the ssid to force connections to specific networks even when the ssid's collide,
|
2020-10-06 19:29:54 +08:00
|
|
|
*/
|
2020-10-29 15:13:08 +08:00
|
|
|
|
|
|
|
/* Extended WiFi Settings */
|
2020-09-09 08:57:37 +08:00
|
|
|
|
2020-10-26 07:20:25 +08:00
|
|
|
/*
|
|
|
|
* Hostname. Optional, uncomment and set if desired
|
|
|
|
* - used in DHCP request when connecting to networks, not used in AP mode
|
|
|
|
* - Most useful when used with a static netwrk config, not all routers respect this setting
|
|
|
|
*
|
|
|
|
* The URL_HOSTNAME will be used in place of the IP address in internal URL's
|
|
|
|
*/
|
|
|
|
|
|
|
|
// #define HOSTNAME "esp-cam"
|
|
|
|
// #define URL_HOSTNAME "esp-cam"
|
2020-09-09 08:57:37 +08:00
|
|
|
|
2020-10-06 19:29:54 +08:00
|
|
|
/*
|
2020-10-26 07:20:25 +08:00
|
|
|
* Static network settings for client mode
|
|
|
|
*
|
|
|
|
* Note: The same settings will be applied to all client connections where the dhcp setting is 'false'
|
|
|
|
* You must define all three: IP, Gateway and NetMask
|
|
|
|
*/
|
2021-12-16 23:10:45 +08:00
|
|
|
// warning - IP addresses must be separated with commas (,) and not decimals (.)
|
2020-10-26 07:20:25 +08:00
|
|
|
// #define ST_IP 192,168,0,123
|
|
|
|
// #define ST_GATEWAY 192,168,0,2
|
|
|
|
// #define ST_NETMASK 255,255,255,0
|
2021-09-25 21:13:29 +08:00
|
|
|
// One or two DNS servers can be supplied, only the NTP code currently uses them
|
2020-10-26 07:20:25 +08:00
|
|
|
// #define ST_DNS1 192,168,0,2
|
|
|
|
// #define ST_DNS2 8,8,8,8
|
|
|
|
|
|
|
|
/*
|
2020-10-06 19:29:54 +08:00
|
|
|
* AccessPoint;
|
2020-10-14 19:40:08 +08:00
|
|
|
*
|
2020-10-06 19:29:54 +08:00
|
|
|
* Uncomment to enable AP mode;
|
2020-10-14 19:40:08 +08:00
|
|
|
*
|
2020-10-06 19:29:54 +08:00
|
|
|
*/
|
2020-10-07 08:08:18 +08:00
|
|
|
// #define WIFI_AP_ENABLE
|
2020-10-06 19:29:54 +08:00
|
|
|
|
|
|
|
/* AP Mode Notes:
|
2020-10-14 19:40:08 +08:00
|
|
|
*
|
2020-10-06 19:29:54 +08:00
|
|
|
* Once enabled the AP ssid and password will be taken from the 1st entry in the stationList[] above.
|
2020-10-14 19:40:08 +08:00
|
|
|
*
|
|
|
|
* If there are further entries listed they will be scanned at startup in the normal way and connected to
|
2020-10-07 08:08:18 +08:00
|
|
|
* if they are found. AP then works as a fallback mode for when there are no 'real' networks available.
|
2020-10-14 19:40:08 +08:00
|
|
|
*
|
2020-10-07 08:08:18 +08:00
|
|
|
* Setting the 'dhcp' field to true for the AP enables a captive portal and attempts to send
|
|
|
|
* all visitors to the webcam page, with varying degrees of success depending on the visitors
|
2020-10-06 19:29:54 +08:00
|
|
|
* browser and other settings.
|
|
|
|
*/
|
2020-10-07 08:08:18 +08:00
|
|
|
// Optionally change the AccessPoint ip address (default = 192.168.4.1)
|
2021-12-16 23:10:45 +08:00
|
|
|
// warning - IP addresses must be separated with commas (,) and not decimals (.)
|
2020-10-06 19:29:54 +08:00
|
|
|
// #define AP_ADDRESS 192,168,4,1
|
|
|
|
|
2020-10-07 08:08:18 +08:00
|
|
|
// Uncomment this to force the AccessPoint channel number, default = 1
|
2020-10-06 19:29:54 +08:00
|
|
|
// #define AP_CHAN 1
|
2020-09-09 08:57:37 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Port numbers for WebUI and Stream, defaults to 80 and 81.
|
|
|
|
* Uncomment and edit as appropriate
|
|
|
|
*/
|
|
|
|
// #define HTTP_PORT 80
|
|
|
|
// #define STREAM_PORT 81
|
|
|
|
|
2020-10-14 19:40:08 +08:00
|
|
|
/*
|
2020-10-06 19:29:54 +08:00
|
|
|
* Wifi Watchdog defines how long we spend waiting for a connection before retrying,
|
|
|
|
* and how often we check to see if we are still connected, milliseconds
|
2021-12-31 09:47:58 +08:00
|
|
|
* You may wish to increase this if your WiFi is slow at conencting.
|
2020-10-06 19:29:54 +08:00
|
|
|
*/
|
2021-12-31 09:47:58 +08:00
|
|
|
// #define WIFI_WATCHDOG 15000
|
2020-10-06 19:29:54 +08:00
|
|
|
|
2021-06-08 21:49:10 +08:00
|
|
|
/*
|
|
|
|
* Over The Air firmware updates can be disabled by uncommenting the folowing line
|
|
|
|
*/
|
|
|
|
// #define NO_OTA
|
|
|
|
|
|
|
|
/*
|
|
|
|
* OTA can be password protected to prevent the device being hijacked
|
|
|
|
*/
|
|
|
|
// #define OTA_PASSWORD "SuperVisor"
|
|
|
|
|
2021-06-09 02:42:14 +08:00
|
|
|
/* NTP
|
|
|
|
* Uncomment the following to enable the on-board clock
|
|
|
|
* Pick a nearby pool server from: https://www.ntppool.org/zone/@
|
|
|
|
* Set the GMT offset to match your timezone IN SECONDS;
|
|
|
|
* see https://en.wikipedia.org/wiki/List_of_UTC_time_offsets
|
|
|
|
* 1hr = 3600 seconds; do the math ;-)
|
|
|
|
* Default is CET (Central European Time), eg GMT + 1hr
|
|
|
|
* The DST offset is usually 1 hour (again, in seconds) if used in your country.
|
|
|
|
*/
|
|
|
|
//#define NTPSERVER "<EDIT THIS>.pool.ntp.org"
|
|
|
|
//#define NTP_GMT_OFFSET 3600
|
|
|
|
//#define NTP_DST_OFFSET 3600
|
|
|
|
|
2020-09-09 08:57:37 +08:00
|
|
|
/*
|
2020-10-07 08:08:18 +08:00
|
|
|
* Camera Defaults
|
2020-09-09 08:57:37 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
// Initial Reslolution, default SVGA
|
2021-05-03 16:35:12 +08:00
|
|
|
// available values are: FRAMESIZE_[THUMB|QQVGA|HQVGA|QVGA|CIF|HVGA|VGA|SVGA|XGA|HD|SXGA|UXGA] + [FHD|QXGA] for 3Mp Sensors; eg ov3660
|
2020-09-09 08:57:37 +08:00
|
|
|
// #define DEFAULT_RESOLUTION FRAMESIZE_SVGA
|
|
|
|
|
|
|
|
// Hardware Horizontal Mirror, 0 or 1 (overrides default board setting)
|
|
|
|
// #define H_MIRROR 0
|
|
|
|
|
|
|
|
// Hardware Vertical Flip , 0 or 1 (overrides default board setting)
|
|
|
|
// #define V_FLIP 1
|
|
|
|
|
|
|
|
// Browser Rotation (one of: -90,0,90, default 0)
|
2020-08-24 03:49:10 +08:00
|
|
|
// #define CAM_ROTATION 0
|
2019-11-18 17:31:48 +08:00
|
|
|
|
2020-09-09 08:57:37 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Additional Features
|
2020-10-14 19:40:08 +08:00
|
|
|
*
|
2020-09-09 08:57:37 +08:00
|
|
|
*/
|
2020-10-07 08:08:18 +08:00
|
|
|
// Default Page: uncomment to make the full control page the default, otherwise show simple viewer
|
|
|
|
// #define DEFAULT_INDEX_FULL
|
2020-09-09 08:57:37 +08:00
|
|
|
|
2021-09-26 19:02:49 +08:00
|
|
|
// Uncomment to disable the notification LED on the module
|
|
|
|
// #define LED_DISABLE
|
|
|
|
|
2020-09-09 08:57:37 +08:00
|
|
|
// Uncomment to disable the illumination lamp features
|
2020-08-24 03:49:10 +08:00
|
|
|
// #define LAMP_DISABLE
|
|
|
|
|
2021-05-17 18:57:33 +08:00
|
|
|
// Define the startup lamp power setting (as a percentage, defaults to 0%)
|
2020-09-09 08:57:37 +08:00
|
|
|
// #define LAMP_DEFAULT 0
|
|
|
|
|
2021-05-17 18:57:33 +08:00
|
|
|
// Assume the module used has a SPIFFS/LittleFS partition, and use that for persistent setting storage
|
|
|
|
// Uncomment to disable this this, the controls will still be shown in the UI but are inoperative.
|
2020-10-06 19:29:54 +08:00
|
|
|
// #define NO_FS
|
|
|
|
|
2020-10-12 00:19:22 +08:00
|
|
|
// Uncomment to enable camera debug info on serial by default
|
2020-10-14 15:36:57 +08:00
|
|
|
// #define DEBUG_DEFAULT_ON
|
2020-10-07 08:08:18 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Camera Hardware Selectiom
|
|
|
|
*
|
|
|
|
* You must uncomment one, and only one, of the lines below to select your board model.
|
|
|
|
* Remember to also select the board in the Boards Manager
|
|
|
|
* This is not optional
|
|
|
|
*/
|
|
|
|
#define CAMERA_MODEL_AI_THINKER // default
|
|
|
|
// #define CAMERA_MODEL_WROVER_KIT
|
|
|
|
// #define CAMERA_MODEL_ESP_EYE
|
|
|
|
// #define CAMERA_MODEL_M5STACK_PSRAM
|
|
|
|
// #define CAMERA_MODEL_M5STACK_V2_PSRAM
|
|
|
|
// #define CAMERA_MODEL_M5STACK_WIDE
|
|
|
|
// #define CAMERA_MODEL_M5STACK_ESP32CAM // Originally: CAMERA_MODEL_M5STACK_NO_PSRAM
|
|
|
|
// #define CAMERA_MODEL_TTGO_T_JOURNAL
|
2021-12-31 18:09:51 +08:00
|
|
|
// #define CAMERA_MODEL_ARDUCAM_ESP32S_UNO
|
2021-07-03 22:10:37 +08:00
|
|
|
|
|
|
|
// Camera module bus communications frequency, setting too high can cause visual artifacts.
|
|
|
|
// Currently defaults to 16.5MHz, but some (non-clone) modules may be able to use the
|
|
|
|
// original frequency of 20MHz for to allow higher framerates etc.
|
|
|
|
// #define XCLK_FREQ_HZ 20000000;
|
2021-12-31 09:47:58 +08:00
|
|
|
// For clone modules that have camera module artifacts and SPIFFS issues; try setting this very low:
|
|
|
|
// #define XCLK_FREQ_HZ 3000000;
|