Closed jackmax closed 2 years ago
the feature is already in ESP3D V3 and webui V3 did you tested it ?
https://github.com/luc-github/ESP3D/tree/3.0 https://github.com/luc-github/ESP3D-WEBUI/tree/3.0
you can also save on ESP32 SD card now https://github.com/luc-github/ESP3D/issues/778
I tested it now.
esp32cam.html
like this:
esp32cam.html
can change camera settings, but no longer works to preview the camera image (takes one picture, then the page has to be refreshed). It would be nice if it did, so you can have a bigger preview of the image.UXGA(1600x1200)
actually sets resolution to 1024x768, SXGA(1280x1024)
to 800x600, etc.CAMERA_DEVICE
is set to CAMERA_MODEL_CUSTOM
. This is because
CAMERA_MODEL_TTGO_T_JOURNAL
CAMERA_MODEL_M5STACK_PSRAM_2
CAMERA_MODEL_M5STACK_ESP32CAM
CAMERA_MODEL_M5STACK_UNITCAM
are not defined, so in expressions like #if CAMERA_DEVICE == CAMERA_MODEL_TTGO_T_JOURNAL
the CAMERA_MODEL_TTGO_T_JOURNAL
defaults to 0, which is the same number as CAMERA_MODEL_CUSTOM
. As a result, the compiler attempts to redefine #define
values.ESP3D_RESET_PIN
doesn't collide with camera pins would be nice. By default pin 0 is used and with camera enabled puts MCU in a reboot loop (very fun if you use OTA).I guess it's good enough so I'll close this PR.
About configurations / compilations I did this to avoid such issues : https://github.com/luc-github/ESP3D-Configurator which is live here: https://luc-github.github.io/
The CAMERA_MODEL_TTGO_T_JOURNAL should not be in pins list , the define is even not it list so it is set 0 - I forget to remove it - thank you for pointing this out, I have removed it
The led flash is disabled on ESP32Cam because it conflict with SD Card per my tests, but you can override the setting by controling pin directly with a macro
The camera settings can be added by macro because they do not need to be in main page, because you do not change them all the time, this is not an outside camera, also if you want bigger output of camera you can put the camera output in full page instead of panel, so you will have dedicated page for camera
about features there is a file already : https://github.com/luc-github/ESP3D/blob/3.0/Features.md
I added code to allow ESP32-CAM modules to capture images and send them over the network. One step closer to having the same functionality as Octoprint, but for a fraction of the price ;)
Code is adapted from Espressif's example web server. Fits in 1227566 bytes of Flash, even though I use a separate web server for streaming images. I also added a new endpoint to the default web server to get and set camera parameters.
The camera.html file is also adapted from the example, it could use some cleanup, optimization and styling to fit with the rest of interface. I'm not good with web development though, so maybe I'll leave it to someone else.
To allow
/camera.html
to be displayed in the iframe, I modifiedindex.html
and changedt.indexOf("rtp://")&&(e="http://"+e)
tot.indexOf("rtp://")&&(!(t.startsWith("/")))&&(e="http://"+e)
Below is a screenshot of the new firmware in action: