From 1184a2af8714ce6a6423dd5cb2b78c17ed624410 Mon Sep 17 00:00:00 2001 From: Hpsaturn Date: Sat, 4 May 2024 19:44:58 +0200 Subject: [PATCH] removed warnnings on S3 cameras configs. Improved samples delays --- .../tjournal-espnow-sender/tjournal-espnow-sender.cpp | 9 +++++++-- .../unitcams3-basic-sender/unitcams3-basic-sender.cpp | 2 +- examples/xiao-espnow-sender/xiao-espnow-sender.cpp | 2 +- src/drivers/CamFreenove.h | 4 ++-- src/drivers/CamXiao.h | 4 ++-- src/drivers/UnitCamS3.h | 4 ++-- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/examples/tjournal-espnow-sender/tjournal-espnow-sender.cpp b/examples/tjournal-espnow-sender/tjournal-espnow-sender.cpp index 902bbe6..622cb74 100644 --- a/examples/tjournal-espnow-sender/tjournal-espnow-sender.cpp +++ b/examples/tjournal-espnow-sender/tjournal-espnow-sender.cpp @@ -16,7 +16,7 @@ ESPNowCam radio; void processFrame() { if (Camera.get()) { radio.sendData(Camera.fb->buf, Camera.fb->len); - delay(25); // ==> weird delay for this camera. + delay(35); // ==> weird delay for NOPSRAM camera. printFPS("CAM:"); Camera.free(); } @@ -25,7 +25,7 @@ void processFrame() { void setup() { Serial.begin(115200); - delay(5000); // only for debugging + delay(1000); // only for debugging if(psramFound()){ size_t psram_size = esp_spiram_get_size() / 1048576; @@ -33,6 +33,11 @@ void setup() { } radio.init(); + + // You are able to change the Camera config E.g: + // Camera.config.fb_count = 2; + // Camera.config.frame_size = FRAMESIZE_QQVGA; + if (!Camera.begin()) { Serial.println("Camera Init Fail"); delay(1000); diff --git a/examples/unitcams3-basic-sender/unitcams3-basic-sender.cpp b/examples/unitcams3-basic-sender/unitcams3-basic-sender.cpp index a6c847d..d52669a 100644 --- a/examples/unitcams3-basic-sender/unitcams3-basic-sender.cpp +++ b/examples/unitcams3-basic-sender/unitcams3-basic-sender.cpp @@ -28,7 +28,7 @@ void processFrame() { void setup() { Serial.begin(115200); - delay(5000); // only for debugging + delay(1000); // only for debugging if(psramFound()){ size_t psram_size = esp_spiram_get_size() / 1048576; diff --git a/examples/xiao-espnow-sender/xiao-espnow-sender.cpp b/examples/xiao-espnow-sender/xiao-espnow-sender.cpp index d7c2419..c9e39d2 100644 --- a/examples/xiao-espnow-sender/xiao-espnow-sender.cpp +++ b/examples/xiao-espnow-sender/xiao-espnow-sender.cpp @@ -28,7 +28,7 @@ void processFrame() { void setup() { Serial.begin(115200); - delay(5000); // only for debugging + delay(1000); // only for debugging if(psramFound()){ size_t psram_size = esp_spiram_get_size() / 1048576; diff --git a/src/drivers/CamFreenove.h b/src/drivers/CamFreenove.h index fd79599..0928d85 100644 --- a/src/drivers/CamFreenove.h +++ b/src/drivers/CamFreenove.h @@ -14,8 +14,8 @@ class CamFreenove : public CameraBase { config.pin_pwdn = -1; config.pin_reset = -1; config.pin_xclk = 15; - config.pin_sscb_sda = 4; - config.pin_sscb_scl = 5; + config.pin_sccb_sda = 4; + config.pin_sccb_scl = 5; config.pin_d7 = 16; config.pin_d6 = 17; config.pin_d5 = 18; diff --git a/src/drivers/CamXiao.h b/src/drivers/CamXiao.h index b5d3473..ebbe04c 100644 --- a/src/drivers/CamXiao.h +++ b/src/drivers/CamXiao.h @@ -15,8 +15,8 @@ class CamXiao : public CameraBase { config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM; config.pin_xclk = XCLK_GPIO_NUM; - config.pin_sscb_sda = SIOD_GPIO_NUM; - config.pin_sscb_scl = SIOC_GPIO_NUM; + config.pin_sccb_sda = SIOD_GPIO_NUM; + config.pin_sccb_scl = SIOC_GPIO_NUM; config.pin_d7 = Y9_GPIO_NUM; config.pin_d6 = Y8_GPIO_NUM; config.pin_d5 = Y7_GPIO_NUM; diff --git a/src/drivers/UnitCamS3.h b/src/drivers/UnitCamS3.h index 1f500c1..21cdb1e 100644 --- a/src/drivers/UnitCamS3.h +++ b/src/drivers/UnitCamS3.h @@ -13,8 +13,8 @@ class UnitCamS3 : public CameraBase { UnitCamS3() { config.pin_reset = 21; config.pin_xclk = 11; - config.pin_sscb_sda = 17; - config.pin_sscb_scl = 41; + config.pin_sccb_sda = 17; + config.pin_sccb_scl = 41; config.pin_d7 = 13; config.pin_d6 = 4; config.pin_d5 = 10;