This commit is contained in:
michael
2024-09-24 03:12:27 +02:00
parent 85375b6505
commit ebcec97d1d
2 changed files with 63 additions and 75 deletions

View File

@@ -63,11 +63,6 @@
// #define GRAYSCALE_AS_DEFAULT
//ClassControllCamera + ClassFlowTakeImage
#define CAMERA_MODEL_AI_THINKER
#define BOARD_ESP32CAM_AITHINKER
//server_GPIO
#define __LEDGLOBAL
@@ -202,67 +197,6 @@
//// Conditionnal definitions ////
/////////////////////////////////////////////
//******* camera model
#if defined(CAMERA_MODEL_WROVER_KIT)
#define CAM_PIN_PWDN GPIO_NUM_NC //power down is not used
#define CAM_PIN_RESET GPIO_NUM_NC //software reset will be performed
#define CAM_PIN_XCLK GPIO_NUM_21
#define CAM_PIN_SIOD GPIO_NUM_26
#define CAM_PIN_SIOC GPIO_NUM_27
#define CAM_PIN_D7 GPIO_NUM_35
#define CAM_PIN_D6 GPIO_NUM_34
#define CAM_PIN_D5 GPIO_NUM_39
#define CAM_PIN_D4 GPIO_NUM_36
#define CAM_PIN_D3 GPIO_NUM_19
#define CAM_PIN_D2 GPIO_NUM_18
#define CAM_PIN_D1 GPIO_NUM_5
#define CAM_PIN_D0 GPIO_NUM_4
#define CAM_PIN_VSYNC GPIO_NUM_25
#define CAM_PIN_HREF GPIO_NUM_23
#define CAM_PIN_PCLK GPIO_NUM_22
#elif defined(CAMERA_MODEL_M5STACK_PSRAM)
#define CAM_PIN_PWDN GPIO_NUM_NC
#define CAM_PIN_RESET GPIO_NUM_15
#define CAM_PIN_XCLK GPIO_NUM_27
#define CAM_PIN_SIOD GPIO_NUM_25
#define CAM_PIN_SIOC GPIO_NUM_23
#define CAM_PIN_D7 GPIO_NUM_19
#define CAM_PIN_D6 GPIO_NUM_36
#define CAM_PIN_D5 GPIO_NUM_18
#define CAM_PIN_D4 GPIO_NUM_39
#define CAM_PIN_D3 GPIO_NUM_5
#define CAM_PIN_D2 GPIO_NUM_34
#define CAM_PIN_D1 GPIO_NUM_35
#define CAM_PIN_D0 GPIO_NUM_32
#define CAM_PIN_VSYNC GPIO_NUM_22
#define CAM_PIN_HREF GPIO_NUM_26
#define CAM_PIN_PCLK GPIO_NUM_21
#elif defined(CAMERA_MODEL_AI_THINKER)
#define CAM_PIN_PWDN GPIO_NUM_32
#define CAM_PIN_RESET GPIO_NUM_NC //software reset will be performed
#define CAM_PIN_XCLK GPIO_NUM_0
#define CAM_PIN_SIOD GPIO_NUM_26
#define CAM_PIN_SIOC GPIO_NUM_27
#define CAM_PIN_D7 GPIO_NUM_35
#define CAM_PIN_D6 GPIO_NUM_34
#define CAM_PIN_D5 GPIO_NUM_39
#define CAM_PIN_D4 GPIO_NUM_36
#define CAM_PIN_D3 GPIO_NUM_21
#define CAM_PIN_D2 GPIO_NUM_19
#define CAM_PIN_D1 GPIO_NUM_18
#define CAM_PIN_D0 GPIO_NUM_5
#define CAM_PIN_VSYNC GPIO_NUM_25
#define CAM_PIN_HREF GPIO_NUM_23
#define CAM_PIN_PCLK GPIO_NUM_22
#else
#error "Camera model not selected"
#endif //camera model
// ******* Board type
#if defined(BOARD_WROVER_KIT) // WROVER-KIT PIN Map
@@ -281,6 +215,24 @@
#define GPIO_SDCARD_D3 GPIO_NUM_13
#endif
#define CAM_PIN_PWDN GPIO_NUM_NC //power down is not used
#define CAM_PIN_RESET GPIO_NUM_NC //software reset will be performed
#define CAM_PIN_XCLK GPIO_NUM_21
#define CAM_PIN_SIOD GPIO_NUM_26
#define CAM_PIN_SIOC GPIO_NUM_27
#define CAM_PIN_D7 GPIO_NUM_35
#define CAM_PIN_D6 GPIO_NUM_34
#define CAM_PIN_D5 GPIO_NUM_39
#define CAM_PIN_D4 GPIO_NUM_36
#define CAM_PIN_D3 GPIO_NUM_19
#define CAM_PIN_D2 GPIO_NUM_18
#define CAM_PIN_D1 GPIO_NUM_5
#define CAM_PIN_D0 GPIO_NUM_4
#define CAM_PIN_VSYNC GPIO_NUM_25
#define CAM_PIN_HREF GPIO_NUM_23
#define CAM_PIN_PCLK GPIO_NUM_22
//Statusled + ClassControllCamera
#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED, On the board the LED is on the IO2, but it is used for the SD
@@ -289,6 +241,24 @@
#define USE_PWM_LEDFLASH // if __LEDGLOBAL is defined, a global variable is used for LED control, otherwise locally and each time a new
#elif defined(BOARD_M5STACK_PSRAM) // M5STACK PSRAM PIN Map
#define CAM_PIN_PWDN GPIO_NUM_NC
#define CAM_PIN_RESET GPIO_NUM_15
#define CAM_PIN_XCLK GPIO_NUM_27
#define CAM_PIN_SIOD GPIO_NUM_25
#define CAM_PIN_SIOC GPIO_NUM_23
#define CAM_PIN_D7 GPIO_NUM_19
#define CAM_PIN_D6 GPIO_NUM_36
#define CAM_PIN_D5 GPIO_NUM_18
#define CAM_PIN_D4 GPIO_NUM_39
#define CAM_PIN_D3 GPIO_NUM_5
#define CAM_PIN_D2 GPIO_NUM_34
#define CAM_PIN_D1 GPIO_NUM_35
#define CAM_PIN_D0 GPIO_NUM_32
#define CAM_PIN_VSYNC GPIO_NUM_22
#define CAM_PIN_HREF GPIO_NUM_26
#define CAM_PIN_PCLK GPIO_NUM_21
//Statusled + ClassControllCamera
#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED
@@ -313,6 +283,24 @@
#define GPIO_SDCARD_D3 GPIO_NUM_13
#endif
#define CAM_PIN_PWDN GPIO_NUM_32
#define CAM_PIN_RESET GPIO_NUM_NC //software reset will be performed
#define CAM_PIN_XCLK GPIO_NUM_0
#define CAM_PIN_SIOD GPIO_NUM_26
#define CAM_PIN_SIOC GPIO_NUM_27
#define CAM_PIN_D7 GPIO_NUM_35
#define CAM_PIN_D6 GPIO_NUM_34
#define CAM_PIN_D5 GPIO_NUM_39
#define CAM_PIN_D4 GPIO_NUM_36
#define CAM_PIN_D3 GPIO_NUM_21
#define CAM_PIN_D2 GPIO_NUM_19
#define CAM_PIN_D1 GPIO_NUM_18
#define CAM_PIN_D0 GPIO_NUM_5
#define CAM_PIN_VSYNC GPIO_NUM_25
#define CAM_PIN_HREF GPIO_NUM_23
#define CAM_PIN_PCLK GPIO_NUM_22
//Statusled + ClassControllCamera
#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED
@@ -320,12 +308,13 @@
#define FLASH_GPIO GPIO_NUM_4 // PIN for flashlight LED
#define USE_PWM_LEDFLASH // if __LEDGLOBAL is defined, a global variable is used for LED control, otherwise locally and each time a new
#endif // ESP32Cam (AiThinker) PIN Map
#else
#error "Board not selected"
#endif //Board PIN Map
// ******* LED definition
#ifdef USE_PWM_LEDFLASH
//// PWM für Flash-LED
#define LEDC_TIMER LEDC_TIMER_1 // LEDC_TIMER_0
#define LEDC_MODE LEDC_LOW_SPEED_MODE

View File

@@ -30,7 +30,6 @@
-DUSE_ESP32
-DUSE_ESP32_FRAMEWORK_ESP_IDF
[flags:runtime]
build_flags =
-Wno-nonnull-compare
@@ -47,6 +46,7 @@
;-Wshadow-compatible-local
-fno-exceptions
; The main env - default
[env:esp32cam]
extends = common:esp32-idf
@@ -57,14 +57,14 @@ build_flags =
${common:esp32-idf.build_flags}
${flags:runtime.build_flags}
; ### Sofware options : (can be set in defines.h)
-D BOARD_ESP32CAM_AITHINKER
-D ENABLE_MQTT
-D ENABLE_INFLUXDB
-D ENABLE_WEBHOOK
-D ENABLE_SOFTAP
board_build.partitions = partitions.csv
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
; full standalone dev mode
; As sample, the board is nod32s instead of esp32cam (do not change nothing in fact :)
@@ -79,6 +79,7 @@ build_flags =
${common:esp32-idf.build_flags}
${flags:clangtidy.build_flags}
; ### Sofware options : (can be set in defines.h)
-D BOARD_ESP32CAM_AITHINKER
-D ENABLE_MQTT
-D ENABLE_INFLUXDB
-D ENABLE_WEBHOOK
@@ -124,8 +125,6 @@ platform_packages =
;;;;espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
board_build.partitions = partitions.csv
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
; Activate all debug mode