mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
cleanup
This commit is contained in:
@@ -63,11 +63,6 @@
|
|||||||
// #define GRAYSCALE_AS_DEFAULT
|
// #define GRAYSCALE_AS_DEFAULT
|
||||||
|
|
||||||
|
|
||||||
//ClassControllCamera + ClassFlowTakeImage
|
|
||||||
#define CAMERA_MODEL_AI_THINKER
|
|
||||||
#define BOARD_ESP32CAM_AITHINKER
|
|
||||||
|
|
||||||
|
|
||||||
//server_GPIO
|
//server_GPIO
|
||||||
#define __LEDGLOBAL
|
#define __LEDGLOBAL
|
||||||
|
|
||||||
@@ -202,8 +197,24 @@
|
|||||||
//// Conditionnal definitions ////
|
//// Conditionnal definitions ////
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
|
|
||||||
//******* camera model
|
|
||||||
#if defined(CAMERA_MODEL_WROVER_KIT)
|
// ******* Board type
|
||||||
|
#if defined(BOARD_WROVER_KIT) // WROVER-KIT PIN Map
|
||||||
|
// SD card (operated with SDMMC peripheral)
|
||||||
|
//-------------------------------------------------
|
||||||
|
#define GPIO_SDCARD_CLK GPIO_NUM_14
|
||||||
|
#define GPIO_SDCARD_CMD GPIO_NUM_15
|
||||||
|
#define GPIO_SDCARD_D0 GPIO_NUM_2
|
||||||
|
#ifndef __SD_USE_ONE_LINE_MODE__
|
||||||
|
#define GPIO_SDCARD_D1 GPIO_NUM_4
|
||||||
|
#define GPIO_SDCARD_D2 GPIO_NUM_12
|
||||||
|
#define GPIO_SDCARD_D3 GPIO_NUM_13
|
||||||
|
#else
|
||||||
|
#define GPIO_SDCARD_D1 GPIO_NUM_NC
|
||||||
|
#define GPIO_SDCARD_D2 GPIO_NUM_NC
|
||||||
|
#define GPIO_SDCARD_D3 GPIO_NUM_13
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CAM_PIN_PWDN GPIO_NUM_NC //power down is not used
|
#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_RESET GPIO_NUM_NC //software reset will be performed
|
||||||
#define CAM_PIN_XCLK GPIO_NUM_21
|
#define CAM_PIN_XCLK GPIO_NUM_21
|
||||||
@@ -222,7 +233,14 @@
|
|||||||
#define CAM_PIN_HREF GPIO_NUM_23
|
#define CAM_PIN_HREF GPIO_NUM_23
|
||||||
#define CAM_PIN_PCLK GPIO_NUM_22
|
#define CAM_PIN_PCLK GPIO_NUM_22
|
||||||
|
|
||||||
#elif defined(CAMERA_MODEL_M5STACK_PSRAM)
|
//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
|
||||||
|
|
||||||
|
//ClassControllCamera
|
||||||
|
#define FLASH_GPIO GPIO_NUM_12 // 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
|
||||||
|
|
||||||
|
#elif defined(BOARD_M5STACK_PSRAM) // M5STACK PSRAM PIN Map
|
||||||
#define CAM_PIN_PWDN GPIO_NUM_NC
|
#define CAM_PIN_PWDN GPIO_NUM_NC
|
||||||
#define CAM_PIN_RESET GPIO_NUM_15
|
#define CAM_PIN_RESET GPIO_NUM_15
|
||||||
#define CAM_PIN_XCLK GPIO_NUM_27
|
#define CAM_PIN_XCLK GPIO_NUM_27
|
||||||
@@ -241,7 +259,30 @@
|
|||||||
#define CAM_PIN_HREF GPIO_NUM_26
|
#define CAM_PIN_HREF GPIO_NUM_26
|
||||||
#define CAM_PIN_PCLK GPIO_NUM_21
|
#define CAM_PIN_PCLK GPIO_NUM_21
|
||||||
|
|
||||||
#elif defined(CAMERA_MODEL_AI_THINKER)
|
//Statusled + ClassControllCamera
|
||||||
|
#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED
|
||||||
|
|
||||||
|
//ClassControllCamera
|
||||||
|
#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
|
||||||
|
|
||||||
|
|
||||||
|
#elif defined(BOARD_ESP32CAM_AITHINKER) // ESP32Cam (AiThinker) PIN Map
|
||||||
|
// SD card (operated with SDMMC peripheral)
|
||||||
|
//-------------------------------------------------
|
||||||
|
#define GPIO_SDCARD_CLK GPIO_NUM_14
|
||||||
|
#define GPIO_SDCARD_CMD GPIO_NUM_15
|
||||||
|
#define GPIO_SDCARD_D0 GPIO_NUM_2
|
||||||
|
#ifndef __SD_USE_ONE_LINE_MODE__
|
||||||
|
#define GPIO_SDCARD_D1 GPIO_NUM_4
|
||||||
|
#define GPIO_SDCARD_D2 GPIO_NUM_12
|
||||||
|
#define GPIO_SDCARD_D3 GPIO_NUM_13
|
||||||
|
#else
|
||||||
|
#define GPIO_SDCARD_D1 GPIO_NUM_NC
|
||||||
|
#define GPIO_SDCARD_D2 GPIO_NUM_NC
|
||||||
|
#define GPIO_SDCARD_D3 GPIO_NUM_13
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CAM_PIN_PWDN GPIO_NUM_32
|
#define CAM_PIN_PWDN GPIO_NUM_32
|
||||||
#define CAM_PIN_RESET GPIO_NUM_NC //software reset will be performed
|
#define CAM_PIN_RESET GPIO_NUM_NC //software reset will be performed
|
||||||
#define CAM_PIN_XCLK GPIO_NUM_0
|
#define CAM_PIN_XCLK GPIO_NUM_0
|
||||||
@@ -260,72 +301,20 @@
|
|||||||
#define CAM_PIN_HREF GPIO_NUM_23
|
#define CAM_PIN_HREF GPIO_NUM_23
|
||||||
#define CAM_PIN_PCLK GPIO_NUM_22
|
#define CAM_PIN_PCLK GPIO_NUM_22
|
||||||
|
|
||||||
|
//Statusled + ClassControllCamera
|
||||||
|
#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED
|
||||||
|
|
||||||
|
//ClassControllCamera
|
||||||
|
#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
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "Camera model not selected"
|
#error "Board not selected"
|
||||||
#endif //camera model
|
#endif //Board PIN Map
|
||||||
|
|
||||||
// ******* Board type
|
|
||||||
#if defined(BOARD_WROVER_KIT) // WROVER-KIT PIN Map
|
|
||||||
// SD card (operated with SDMMC peripheral)
|
|
||||||
//-------------------------------------------------
|
|
||||||
#define GPIO_SDCARD_CLK GPIO_NUM_14
|
|
||||||
#define GPIO_SDCARD_CMD GPIO_NUM_15
|
|
||||||
#define GPIO_SDCARD_D0 GPIO_NUM_2
|
|
||||||
#ifndef __SD_USE_ONE_LINE_MODE__
|
|
||||||
#define GPIO_SDCARD_D1 GPIO_NUM_4
|
|
||||||
#define GPIO_SDCARD_D2 GPIO_NUM_12
|
|
||||||
#define GPIO_SDCARD_D3 GPIO_NUM_13
|
|
||||||
#else
|
|
||||||
#define GPIO_SDCARD_D1 GPIO_NUM_NC
|
|
||||||
#define GPIO_SDCARD_D2 GPIO_NUM_NC
|
|
||||||
#define GPIO_SDCARD_D3 GPIO_NUM_13
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//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
|
|
||||||
|
|
||||||
//ClassControllCamera
|
|
||||||
#define FLASH_GPIO GPIO_NUM_12 // 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
|
|
||||||
|
|
||||||
#elif defined(BOARD_M5STACK_PSRAM) // M5STACK PSRAM PIN Map
|
|
||||||
//Statusled + ClassControllCamera
|
|
||||||
#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED
|
|
||||||
|
|
||||||
//ClassControllCamera
|
|
||||||
#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
|
|
||||||
|
|
||||||
|
|
||||||
#elif defined(BOARD_ESP32CAM_AITHINKER) // ESP32Cam (AiThinker) PIN Map
|
|
||||||
// SD card (operated with SDMMC peripheral)
|
|
||||||
//-------------------------------------------------
|
|
||||||
#define GPIO_SDCARD_CLK GPIO_NUM_14
|
|
||||||
#define GPIO_SDCARD_CMD GPIO_NUM_15
|
|
||||||
#define GPIO_SDCARD_D0 GPIO_NUM_2
|
|
||||||
#ifndef __SD_USE_ONE_LINE_MODE__
|
|
||||||
#define GPIO_SDCARD_D1 GPIO_NUM_4
|
|
||||||
#define GPIO_SDCARD_D2 GPIO_NUM_12
|
|
||||||
#define GPIO_SDCARD_D3 GPIO_NUM_13
|
|
||||||
#else
|
|
||||||
#define GPIO_SDCARD_D1 GPIO_NUM_NC
|
|
||||||
#define GPIO_SDCARD_D2 GPIO_NUM_NC
|
|
||||||
#define GPIO_SDCARD_D3 GPIO_NUM_13
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//Statusled + ClassControllCamera
|
|
||||||
#define BLINK_GPIO GPIO_NUM_33 // PIN for red board LED
|
|
||||||
|
|
||||||
//ClassControllCamera
|
|
||||||
#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
|
|
||||||
|
|
||||||
|
|
||||||
// ******* LED definition
|
// ******* LED definition
|
||||||
#ifdef USE_PWM_LEDFLASH
|
#ifdef USE_PWM_LEDFLASH
|
||||||
|
|
||||||
//// PWM für Flash-LED
|
//// PWM für Flash-LED
|
||||||
#define LEDC_TIMER LEDC_TIMER_1 // LEDC_TIMER_0
|
#define LEDC_TIMER LEDC_TIMER_1 // LEDC_TIMER_0
|
||||||
#define LEDC_MODE LEDC_LOW_SPEED_MODE
|
#define LEDC_MODE LEDC_LOW_SPEED_MODE
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
-DUSE_ESP32
|
-DUSE_ESP32
|
||||||
-DUSE_ESP32_FRAMEWORK_ESP_IDF
|
-DUSE_ESP32_FRAMEWORK_ESP_IDF
|
||||||
|
|
||||||
|
|
||||||
[flags:runtime]
|
[flags:runtime]
|
||||||
build_flags =
|
build_flags =
|
||||||
-Wno-nonnull-compare
|
-Wno-nonnull-compare
|
||||||
@@ -47,6 +46,7 @@
|
|||||||
;-Wshadow-compatible-local
|
;-Wshadow-compatible-local
|
||||||
-fno-exceptions
|
-fno-exceptions
|
||||||
|
|
||||||
|
|
||||||
; The main env - default
|
; The main env - default
|
||||||
[env:esp32cam]
|
[env:esp32cam]
|
||||||
extends = common:esp32-idf
|
extends = common:esp32-idf
|
||||||
@@ -57,14 +57,14 @@ build_flags =
|
|||||||
${common:esp32-idf.build_flags}
|
${common:esp32-idf.build_flags}
|
||||||
${flags:runtime.build_flags}
|
${flags:runtime.build_flags}
|
||||||
; ### Sofware options : (can be set in defines.h)
|
; ### Sofware options : (can be set in defines.h)
|
||||||
|
-D BOARD_ESP32CAM_AITHINKER
|
||||||
-D ENABLE_MQTT
|
-D ENABLE_MQTT
|
||||||
-D ENABLE_INFLUXDB
|
-D ENABLE_INFLUXDB
|
||||||
-D ENABLE_WEBHOOK
|
-D ENABLE_WEBHOOK
|
||||||
-D ENABLE_SOFTAP
|
-D ENABLE_SOFTAP
|
||||||
board_build.partitions = partitions.csv
|
board_build.partitions = partitions.csv
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_rts = 0
|
|
||||||
monitor_dtr = 0
|
|
||||||
|
|
||||||
; full standalone dev mode
|
; full standalone dev mode
|
||||||
; As sample, the board is nod32s instead of esp32cam (do not change nothing in fact :)
|
; 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}
|
${common:esp32-idf.build_flags}
|
||||||
${flags:clangtidy.build_flags}
|
${flags:clangtidy.build_flags}
|
||||||
; ### Sofware options : (can be set in defines.h)
|
; ### Sofware options : (can be set in defines.h)
|
||||||
|
-D BOARD_ESP32CAM_AITHINKER
|
||||||
-D ENABLE_MQTT
|
-D ENABLE_MQTT
|
||||||
-D ENABLE_INFLUXDB
|
-D ENABLE_INFLUXDB
|
||||||
-D ENABLE_WEBHOOK
|
-D ENABLE_WEBHOOK
|
||||||
@@ -124,8 +125,6 @@ platform_packages =
|
|||||||
;;;;espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
|
;;;;espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
|
||||||
board_build.partitions = partitions.csv
|
board_build.partitions = partitions.csv
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_rts = 0
|
|
||||||
monitor_dtr = 0
|
|
||||||
|
|
||||||
|
|
||||||
; Activate all debug mode
|
; Activate all debug mode
|
||||||
|
|||||||
Reference in New Issue
Block a user