esp32 cam and ST7789V #874
-
I've been trying to figure out how to get the ESP32 cam selfie project to work. I've got most of it. I can't seem to fill the screen with the image from the camera, I've gone over everything I can think of. Examples work fine. They fill the tft completely the way they should, but when I use the camera I think I'm only getting half or a quarter of the image and I can't move it very far before it disappears. Seems that maybe the image has a center pivot point attached to the corner of the tft. ` #include "esp_camera.h" #include <SPI.h> String filelist; // CAMERA_MODEL_AI_THINKER static inline mtmn_config_t app_mtmn_config() void setup() { pinMode(4, OUTPUT);// initialize io4 as an output for LED flash. tft.begin(); tft.setRotation(1); // 0 & 2 Portrait. 1 & 3 landscape delay(100); camera_config_t config; //init with high specs to pre-allocate larger buffers // camera init if (SPIFFS.begin()){ } String filelist_spiffs() filelist = ""; fs::File file = root.openNextFile(); uint8_t scale = (uint8_t)JPEG_DIV_NONE; void loop() { size_t fb_len = 0; esp_camera_fb_return(fb); /* tft.resetViewport(); //fex.drawJpg((const uint8_t*)fb->buf, fb->len,100,65,240,135,0,0,(jpeg_div_t)scale); esp_camera_fb_return(fb); }*/` |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
This is probably related to the issue #873 which is under investigation. |
Beta Was this translation helpful? Give feedback.
-
Issue #873 has been resolved but is not the cause of the problem you are experiencing. I will investigate further. |
Beta Was this translation helpful? Give feedback.
-
The problem is in the TFT_eFEX library, when it decodes the jpeg it appears to be corrupting the offset value for some reason. I would use my TJpg_Decoder and do not load TFT_eFEX. There are examples with that library. The key additions to your sketch are a rendering function:
A few lines in setup:
Then this function to render the Jpeg:
|
Beta Was this translation helpful? Give feedback.
-
It works, thank you so much. |
Beta Was this translation helpful? Give feedback.
The problem is in the TFT_eFEX library, when it decodes the jpeg it appears to be corrupting the offset value for some reason.
I would use my TJpg_Decoder and do not load TFT_eFEX. There are examples with that library. The key additions to your sketch are a rendering function:
A few lines in setup: