Skip to content

Commit

Permalink
Added unitcams3
Browse files Browse the repository at this point in the history
  • Loading branch information
rzeldent committed Feb 5, 2024
1 parent 545a824 commit 138c620
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 15 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ This software supports the following ESP32-CAM (and alike) modules:
- M5STACK ESP32CAM
- M5STACK_PSRAM
- M5STACK_UNITCAM
- M5STACK_UNITCAMS3
- M5STACK_V2_PSRAM
- M5STACK_PSRAM
- M5STACK_WIDE
Expand Down Expand Up @@ -289,15 +290,16 @@ Not all the boards are equipped with PSRAM:

| Board | PSRAM |
|--- |--- |
| WROVER_KIT | Yes |
| ESP_EYE | Yes |
| ESP32S3_EYE | Yes |
| M5STACK_PSRAM | Yes |
| WROVER_KIT | 8Mb |
| ESP_EYE | 8Mb |
| ESP32S3_EYE | 8Mb |
| M5STACK_PSRAM | 8Mb |
| M5STACK_V2_PSRAM | Version B only |
| M5STACK_WIDE | Yes |
| M5STACK_WIDE | 8Mb |
| M5STACK_ESP32CAM | No |
| M5STACK_UNITCAM | No |
| AI_THINKER | Yes |
| M5STACK_UNITCAMS3 | 8Mb |
| AI_THINKER | 8Mb |
| TTGO_T_JOURNAL | No |
| ESP32_CAM_BOARD | ? |
| ESP32S2_CAM_BOARD | ? |
Expand Down
2 changes: 1 addition & 1 deletion boards/esp32cam_ai_thinker.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"'-D ESP32CAM_AI_THINKER'",
"'-D BOARD_HAS_PSRAM'",
"'-mfix-esp32-psram-cache-issue'",
"'-D LED_BUILTIN=33'",
"'-D LED_GPIO=33'",
"'-D CAMERA_CONFIG_PIN_PWDN=32'",
"'-D CAMERA_CONFIG_PIN_RESET=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_XCLK=0'",
Expand Down
2 changes: 1 addition & 1 deletion boards/esp32cam_espressif_esp_eye.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"'-D ESP32CAM_ESPRESSIF_ESP_EYE'",
"'-D BOARD_HAS_PSRAM'",
"'-mfix-esp32-psram-cache-issue'",
"'-D LED_BUILTIN=14'",
"'-D LED_GPIO=14'",
"'-D CAMERA_CONFIG_PIN_PWDN=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_RESET=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_XCLK=11'",
Expand Down
2 changes: 1 addition & 1 deletion boards/esp32cam_freenove_wrover_kit.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"'-D ESP32CAM_WROVER_KIT'",
"'-D BOARD_HAS_PSRAM'",
"'-mfix-esp32-psram-cache-issue'",
"'-D LED_BUILTIN=2'",
"'-D LED_GPIO=2'",
"'-D CAMERA_CONFIG_PIN_PWDN=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_RESET=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_XCLK=21'",
Expand Down
78 changes: 78 additions & 0 deletions boards/esp32cam_m5stack_unitcams3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"build": {
"arduino": {
"ldscript": "esp32s3_out.ld",
"partitions": "default_8MB.csv",
"memory_type": "qio_opi"
},
"core": "esp32",
"extra_flags": [
"'-D ESP32CAM_M5STACK_UNITCAMS3'",
"'-D BOARD_HAS_PSRAM'",
"'-D ARDUINO_USB_MODE=1'",
"'-D ARDUINO_USB_CDC_ON_BOOT=1'",
"'-D ARDUINO_RUNNING_CORE=1'",
"'-D ARDUINO_EVENT_RUNNING_CORE=1'",
"'-D LED_GPIO=14'",
"'-D CAMERA_CONFIG_PIN_PWDN=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_RESET=GPIO_NUM_NC'",
"'-D CAMERA_CONFIG_PIN_XCLK=21'",
"'-D CAMERA_CONFIG_PIN_SCCB_SDA=26'",
"'-D CAMERA_CONFIG_PIN_SCCB_SCL=27'",
"'-D CAMERA_CONFIG_PIN_Y9=35'",
"'-D CAMERA_CONFIG_PIN_Y8=34'",
"'-D CAMERA_CONFIG_PIN_Y7=39'",
"'-D CAMERA_CONFIG_PIN_Y6=36'",
"'-D CAMERA_CONFIG_PIN_Y5=19'",
"'-D CAMERA_CONFIG_PIN_Y4=18'",
"'-D CAMERA_CONFIG_PIN_Y3=5'",
"'-D CAMERA_CONFIG_PIN_Y2=4'",
"'-D CAMERA_CONFIG_PIN_VSYNC=25'",
"'-D CAMERA_CONFIG_PIN_HREF=23'",
"'-D CAMERA_CONFIG_PIN_PCLK=22'",
"'-D CAMERA_CONFIG_CLK_FREQ_HZ=20000000'",
"'-D CAMERA_CONFIG_LEDC_TIMER=LEDC_TIMER_0'",
"'-D CAMERA_CONFIG_LEDC_CHANNEL=LEDC_CHANNEL_0'",
"'-D CAMERA_CONFIG_FB_COUNT=2'",
"'-D CAMERA_CONFIG_FB_LOCATION=CAMERA_FB_IN_DRAM'",
"'-D I2C_MEMS_SDA=48'",
"'-D I2C_MEMS_SCL=47'"
],
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"hwids": [
[
"0x2886",
"0x0056"
],
[
"0x2886",
"0x8056"
]
],
"mcu": "esp32s3",
"variant": "esp32s3"
},
"connectivity": [
"bluetooth",
"wifi"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "M5STACK UNITCAMS3",
"upload": {
"flash_size": "8MB",
"maximum_ram_size": 327680,
"maximum_size": 8388608,
"require_upload_port": true,
"speed": 460800
},
"url": "https://docs.m5stack.com/en/unit/Unit-CamS3",
"vendor": "M5STACK"
}
4 changes: 4 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#default_envs = esp32cam_m5stack_esp32cam
#default_envs = esp32cam_m5stack_psram
#default_envs = esp32cam_m5stack_unitcam
#default_envs = esp32cam_m5stack_unitcams3
#default_envs = esp32cam_m5stack_v2_psram
#default_envs = esp32cam_m5stack_wide
#default_envs = esp32cam_ttgo_t_camera
Expand Down Expand Up @@ -96,6 +97,9 @@ board = esp32cam_m5stack_psram
[env:esp32cam_m5stack_unitcam]
board = esp32cam_m5stack_unitcam

[env:esp32cam_m5stack_unitcams3]
board = esp32cam_m5stack_unitcams3

[env:esp32cam_m5stack_v2_psram]
board = esp32cam_m5stack_v2_psram

Expand Down
12 changes: 6 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ void setup()
{
// Disable brownout
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);
// LED_BUILTIN (GPIO33) has inverted logic false => LED on
#ifdef LED_BUILTIN
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, false);
// LED_GPIO (GPIO33) has inverted logic false => LED on
#ifdef LED_GPIO
pinMode(LED_GPIO, OUTPUT);
digitalWrite(LED_GPIO, false);
#endif

// ESP32S2 has no serial port
Expand Down Expand Up @@ -372,8 +372,8 @@ void setup()
iotWebConf.getApTimeoutParameter()->visible = true;
iotWebConf.setConfigSavedCallback(on_config_saved);
iotWebConf.setWifiConnectionCallback(on_connected);
#ifdef LED_BUILTIN
iotWebConf.setStatusPin(LED_BUILTIN, LOW);
#ifdef LED_GPIO
iotWebConf.setStatusPin(LED_GPIO, LOW);
#endif
iotWebConf.init();

Expand Down

0 comments on commit 138c620

Please sign in to comment.