mirror of
https://github.com/easytarget/esp32-cam-webserver.git
synced 2024-02-16 18:18:24 +08:00
defaults, not personal settings (#12)
This commit is contained in:
@ -36,10 +36,14 @@
|
||||
// I keep my settings in a seperate header file
|
||||
#include "myconfig.h"
|
||||
#else
|
||||
const char* ssid = "my-access-point-ssid";
|
||||
const char* password = "my-access-point-password";
|
||||
// used for wifi AP
|
||||
const int wifichan = 5;
|
||||
// Default Setup; an accesspoint
|
||||
// SSID and Password for the accesspoint we want to join, or create
|
||||
char* ssid = "ESP32-CAM-CONNECT";
|
||||
const char* password = "InsecurePassword";
|
||||
// Accesspoint mode: comment out to join an existing network
|
||||
#define WIFI_AP
|
||||
// Optional fixed channel for accesspoint
|
||||
// #define AP_CHAN 5
|
||||
#endif
|
||||
|
||||
// A Name for the Camera. (can be set in myconfig.h)
|
||||
@ -51,8 +55,9 @@
|
||||
|
||||
// This will be displayed to identify the firmware
|
||||
char myVer[] PROGMEM = __DATE__ " @ " __TIME__;
|
||||
char myRotation[5];
|
||||
|
||||
// current rotation direction
|
||||
char myRotation[5];
|
||||
|
||||
#include "camera_pins.h"
|
||||
|
||||
@ -89,7 +94,6 @@ void setup() {
|
||||
|
||||
// set the initialisation for image rotation
|
||||
int n = snprintf(myRotation,sizeof(myRotation),"%d",CAM_ROTATION);
|
||||
// Serial.printf("Config Rotation: \"%s\" size %d\n",myRotation,sizeof(myRotation));
|
||||
|
||||
|
||||
#ifdef LED_PIN // If we have a notification LED set it to output
|
||||
@ -174,7 +178,11 @@ void setup() {
|
||||
|
||||
#ifdef WIFI_AP
|
||||
Serial.println("Setting up AP");
|
||||
WiFi.softAP(ssid, password, wifichan);
|
||||
#ifdef AP_CHAN
|
||||
WiFi.softAP(ssid, password, AP_CHAN);
|
||||
# else
|
||||
WiFi.softAP(ssid, password);
|
||||
#endif
|
||||
#else
|
||||
WiFi.begin(ssid, password);
|
||||
|
||||
|
@ -3,15 +3,15 @@
|
||||
|
||||
const char* ssid = "my-access-point-ssid";
|
||||
const char* password = "my-access-point-password";
|
||||
const int wifichan = 5;
|
||||
|
||||
// Optionally give the camera a name for the web interface
|
||||
// (nb: this is not the network hostname)
|
||||
#define CAM_NAME "UltiCam"
|
||||
#define CAM_NAME "my-awesome-webcam"
|
||||
|
||||
// Optional initial rotation
|
||||
#define CAM_ROTATION 90
|
||||
|
||||
// Optional AP setup
|
||||
#define WIFI_AP
|
||||
// #define CAM_ROTATION 90
|
||||
|
||||
// Optional AccessPoint setup, uncomment to enable
|
||||
// #define WIFI_AP
|
||||
// Optionall accesspoint channel number
|
||||
// #define AP_CHAN 5
|
||||
|
Reference in New Issue
Block a user