m5stack / UnitCamS3-UserDemo

UnitCamS3 user demo for hardware evaluation.
MIT License
6 stars 5 forks source link

UnitCamS3 Trouble programming in Arduino IDE and getting 2mp image #8

Closed teastainGit closed 4 months ago

teastainGit commented 4 months ago

I just received my new UnitCamS3 and I was dissatisfied with the built in app, so I tried to program it in Arduino IDE. (The camera only showed a series of lo-res images of an increasingly perplexed and annoyed old man) The specs say 2 megapixel, but the supplied app is only 640x480 (0.3 megapixel). I cannot find an Arduino sketch that will compile and run and output a 2mp image. The demo firmware is written for Platformio and I am not interested in installing that and the learning curve. So, Is it possible to program with Arduino IDE and achieve 2mp? Thanks Terry, teastain

Forairaaaaa commented 4 months ago

Hi, try this: https://github.com/espressif/arduino-esp32/tree/cf448906b3836fbe9368934713b697469254c62f/libraries/ESP32/examples/Camera/CameraWebServer

teastainGit commented 4 months ago

That looks good, but what camera to define?

// ===================
// Select camera model
// ===================
//#define CAMERA_MODEL_WROVER_KIT // Has PSRAM
#define CAMERA_MODEL_ESP_EYE  // Has PSRAM
//#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
//#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM
//#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
//#define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
//#define CAMERA_MODEL_XIAO_ESP32S3 // Has PSRAM
// ** Espressif Internal Boards **
//#define CAMERA_MODEL_ESP32_CAM_BOARD
//#define CAMERA_MODEL_ESP32S2_CAM_BOARD
//#define CAMERA_MODEL_ESP32S3_CAM_LCD
//#define CAMERA_MODEL_DFRobot_FireBeetle2_ESP32S3 // Has PSRAM
//#define CAMERA_MODEL_DFRobot_Romeo_ESP32S3 // Has PSRAM

Thanks for your help, I am sure I will get it to work! -teastain

Forairaaaaa commented 4 months ago

That looks good, but what camera to define?

// ===================
// Select camera model
// ===================
//#define CAMERA_MODEL_WROVER_KIT // Has PSRAM
#define CAMERA_MODEL_ESP_EYE  // Has PSRAM
//#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM // Has PSRAM
//#define CAMERA_MODEL_M5STACK_V2_PSRAM // M5Camera version B Has PSRAM
//#define CAMERA_MODEL_M5STACK_WIDE // Has PSRAM
//#define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM
//#define CAMERA_MODEL_M5STACK_UNITCAM // No PSRAM
//#define CAMERA_MODEL_AI_THINKER // Has PSRAM
//#define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM
//#define CAMERA_MODEL_XIAO_ESP32S3 // Has PSRAM
// ** Espressif Internal Boards **
//#define CAMERA_MODEL_ESP32_CAM_BOARD
//#define CAMERA_MODEL_ESP32S2_CAM_BOARD
//#define CAMERA_MODEL_ESP32S3_CAM_LCD
//#define CAMERA_MODEL_DFRobot_FireBeetle2_ESP32S3 // Has PSRAM
//#define CAMERA_MODEL_DFRobot_Romeo_ESP32S3 // Has PSRAM

Thanks for your help, I am sure I will get it to work! -teastain

You can choose CAMERA_MODEL_ESP_EYE, and apply a little tweak in camera_pins.h like this: https://github.com/m5stack/UnitCamS3-UserDemo/blob/main/firmware/src/hal/cam/camera_pins.h#L21

teastainGit commented 4 months ago

Thank you so much for your patient, expert advice. I got in working in Arduino IDE thanks to you! cheers, teastain

Forairaaaaa commented 4 months ago

You're welcome