From af882b5a3b33fc59e549e9715a67d6c5260cfb9c Mon Sep 17 00:00:00 2001 From: Scott Alfter Date: Fri, 26 Nov 2021 14:35:33 -0800 Subject: [PATCH] configuration more or less dialed in --- .gitignore | 5 +++++ .vscode/extensions.json | 7 +++++++ platformio.ini | 4 ++-- src/main.cpp | 7 +++++-- src/webstream.cpp | 2 +- src/wifikeys.h | 4 ++-- 6 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 .gitignore create mode 100644 .vscode/extensions.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..89cc49c --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.pio +.vscode/.browse.c_cpp.db* +.vscode/c_cpp_properties.json +.vscode/launch.json +.vscode/ipch diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..0f0d740 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ] +} diff --git a/platformio.ini b/platformio.ini index 701067b..0d2e7e2 100644 --- a/platformio.ini +++ b/platformio.ini @@ -13,8 +13,8 @@ platform = espressif32 board = esp32cam framework = arduino board_build.partitions = customparts.csv -;upload_port = COM6 ;com port of the ESP32-cam -upload_port = x.x.x.x ;ip address of the ESP32-cam +upload_port = /dev/ttyUSB0 ;com port of the ESP32-cam +; upload_port = x.x.x.x ;ip address of the ESP32-cam build_flags = ; -DBOARD_HAS_PSRAM=TRUE -DLED_BUILTIN=4 diff --git a/src/main.cpp b/src/main.cpp index 8b82dfc..8a6ef4a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,8 +33,11 @@ void setup() // Initialize the ESP32 CAM, here we use the AIthinker ESP32 CAM delay(100); - cam.init(esp32cam_aithinker_config); - delay(100); + camera_config_t cfg=esp32cam_aithinker_config; + cfg.frame_size=FRAMESIZE_XGA; + cfg.jpeg_quality=25; + cfg.fb_count=1; // 2 causes interference-like streaking + cam.init(cfg); delay(100); //LED settings pinMode(LED_BUILTIN, OUTPUT); diff --git a/src/webstream.cpp b/src/webstream.cpp index fc3365c..e119c11 100644 --- a/src/webstream.cpp +++ b/src/webstream.cpp @@ -116,7 +116,7 @@ void handle_jpg_stream(void) thisClient.write((char *)cam.getfb(), cam.getSize()); server1.sendContent("\r\n"); - delay(20); + delay(100); // 10 fps } } diff --git a/src/wifikeys.h b/src/wifikeys.h index 48787f6..3851c14 100644 --- a/src/wifikeys.h +++ b/src/wifikeys.h @@ -1,4 +1,4 @@ #include // Change YOUR_AP_NAME and YOUR_AP_PASSWORD to your WiFi credentials -const char *ssid = "YOUR_SSID"; // Put your SSID here -const char *password = "YOUR_PASSWORD"; // Put your PASSWORD here \ No newline at end of file +const char *ssid = "ncc74656"; // Put your SSID here +const char *password = "Rw7qfY5tmtaWbXaWQ5aMSRkF"; // Put your PASSWORD here \ No newline at end of file