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
|
// I keep my settings in a seperate header file
|
||||||
#include "myconfig.h"
|
#include "myconfig.h"
|
||||||
#else
|
#else
|
||||||
const char* ssid = "my-access-point-ssid";
|
// Default Setup; an accesspoint
|
||||||
const char* password = "my-access-point-password";
|
// SSID and Password for the accesspoint we want to join, or create
|
||||||
// used for wifi AP
|
char* ssid = "ESP32-CAM-CONNECT";
|
||||||
const int wifichan = 5;
|
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
|
#endif
|
||||||
|
|
||||||
// A Name for the Camera. (can be set in myconfig.h)
|
// A Name for the Camera. (can be set in myconfig.h)
|
||||||
@ -51,8 +55,9 @@
|
|||||||
|
|
||||||
// This will be displayed to identify the firmware
|
// This will be displayed to identify the firmware
|
||||||
char myVer[] PROGMEM = __DATE__ " @ " __TIME__;
|
char myVer[] PROGMEM = __DATE__ " @ " __TIME__;
|
||||||
char myRotation[5];
|
|
||||||
|
|
||||||
|
// current rotation direction
|
||||||
|
char myRotation[5];
|
||||||
|
|
||||||
#include "camera_pins.h"
|
#include "camera_pins.h"
|
||||||
|
|
||||||
@ -89,7 +94,6 @@ void setup() {
|
|||||||
|
|
||||||
// set the initialisation for image rotation
|
// set the initialisation for image rotation
|
||||||
int n = snprintf(myRotation,sizeof(myRotation),"%d",CAM_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
|
#ifdef LED_PIN // If we have a notification LED set it to output
|
||||||
@ -174,7 +178,11 @@ void setup() {
|
|||||||
|
|
||||||
#ifdef WIFI_AP
|
#ifdef WIFI_AP
|
||||||
Serial.println("Setting up 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
|
#else
|
||||||
WiFi.begin(ssid, password);
|
WiFi.begin(ssid, password);
|
||||||
|
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
const char* ssid = "my-access-point-ssid";
|
const char* ssid = "my-access-point-ssid";
|
||||||
const char* password = "my-access-point-password";
|
const char* password = "my-access-point-password";
|
||||||
const int wifichan = 5;
|
|
||||||
|
|
||||||
// Optionally give the camera a name for the web interface
|
// Optionally give the camera a name for the web interface
|
||||||
// (nb: this is not the network hostname)
|
// (nb: this is not the network hostname)
|
||||||
#define CAM_NAME "UltiCam"
|
#define CAM_NAME "my-awesome-webcam"
|
||||||
|
|
||||||
// Optional initial rotation
|
// Optional initial rotation
|
||||||
#define CAM_ROTATION 90
|
// #define CAM_ROTATION 90
|
||||||
|
|
||||||
// Optional AP setup
|
|
||||||
#define WIFI_AP
|
|
||||||
|
|
||||||
|
// Optional AccessPoint setup, uncomment to enable
|
||||||
|
// #define WIFI_AP
|
||||||
|
// Optionall accesspoint channel number
|
||||||
|
// #define AP_CHAN 5
|
||||||
|
Reference in New Issue
Block a user