A work in progress.. And not a project for the faint of heart....
So - with a esp32cam board (optimism is a dangerous thing) I wanted to get the camera working from within FC...
First job is to get the camera component compiling from within Flowcode.
So - first get the the esp32 camera source... (this is at https://github.com/espressif/esp32-camera)
Then copy the esp32-camera directory to a new location.
Now create a new FC project and save it to this 'esp32-camera' directory - and call it examples.fcfx Note that FC10 seems to do things 'slightly' differently - and I haven't experimented with renaming the examples folder - however I don't want FC to create the main folder and sdkconfig.
In the examples folder edit CMakelists.txt and change project to esp-project (last lines should read:
In the examples\main directory edit CMakelists.txt and change the first line toproject(esp-project)
Edit take_picture.c and change the first line of init_camera toset(COMPONENT_SRCS "take_picture.c" "esp-project.c")
and change app_main() toint init_camera()
Addvoid snap()
{
camera_fb_t *pic = esp_camera_fb_get();
// use pic->buf to access the image
esp_camera_fb_return(pic);
}
#include "take_picture.h" to the start of the file...
Note that we will need to get rid of the esp_camera_fb_return line (and call this after dealing with the photo - however the first task is to get this to compile...
Create a new file take_picture.h
Continued in next post...#ifndef take_picture
#define take_picture 1
int init_camera();
void snap();
#endif