I have been trying to build the ESP32 camera from the Prusa ESP32 camera project.
For some reason the “.h” packages are not installing. I have tried this on VSC with Platform IO on both Linux Mint and Windows machines. I am not sure where I am going wrong. Some of the libraries that are in the project are not in PlatformIO and I pulled them off Github. I have a separate project that I dropped the libraries in directly from Github and tried it that way with no luck.
Does anyone have any suggestions to get me pointed in the right direction ?
Thank you!
/*
This code is adapted for the ESP32-CAM board Ai Thinker version
It's neccesary install support for ESP32 board to the arduino IDE. In the board manager we need add next link
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
Then we can install "ESP32 by Espressif Systems" board in the board manager.
ESP32 lib version: 2.0.16 (ESP-IDF v4.4.7) by Espressif Systems
This project uses other libraries. It is necessary to install them in the arduino IDE.
- Library - License - Version - Link
- ESPAsyncWebSrv - LGPL 2.1 - 1.2.7 - https://github.com/dvarrel/ESPAsyncWebSrv
- AsyncTCP - LGPL 3.0 - 1.1.4 - https://github.com/dvarrel/ESPAsyncTCP
- ArduinoJson - MIT - 7.0.4 - https://github.com/bblanchon/ArduinoJson
- ArduinoUniqueID - MIT - 1.3.0 - https://github.com/ricaun/ArduinoUniqueID
- ESP32 - LGPL 2.1 - 2.0.16 - https://github.com/espressif/arduino-esp32
Board configuration in the arduino IDE 2.3.2
Tools -> Board -> ESP32 Arduino -> AI Thinker ESP32
Tools -> Flash frequency -> 80MHz
Tools -> Flash Mode -> DIO
Tools -> Partition scheme -> Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
When flashing the firmware to a new, empty ESP32-CAM device for the first time, it is necessary to use the 'Erase' function.
This can be found under 'Tools' -> 'Erase all Flash Before Sketch Upload' -> 'Enable'.
After the initial firmware upload to the MCU, it is possible to disable this option.
If you do not disable this option, your camera configuration will continue to be erased from the flash memory
after uploading new firmware from the Arduino IDE.
Here is partitions table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1E0000,
app1, app, ota_1, 0x1F0000,0x1E0000,
spiffs, data, spiffs, 0x3D0000,0x20000,
coredump, data, coredump,0x3F0000,0x10000,
Project: ESP32 PrusaConnect Camera
Developed for: Prusa Research, prusa3d.com
Author: Miroslav Pivovarsky
e-mail: miroslav.pivovarsky@gmail.com
*/
/* includes */
#include <WiFi.h>
#include "Arduino.h"
#include <esp_task_wdt.h>
#include <ESPmDNS.h>
#include <esp_wifi.h>
#include "esp32-hal-cpu.h"
#include "server.h"
#include "cfg.h"
#include "var.h"
#include "mcu_cfg.h"
#include "system.h"
#include "micro_sd.h"
#include "log.h"
#include "connect.h"
#include "wifi_mngt.h"
#include "stream.h"
#include "serial_cfg.h"
Compiling .pio/build/esp32cam/src/main.cpp.o
src/main.cpp:52:10: fatal error: server.h: No such file or directory
****************************************************************
* Looking for server.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:server.h"
* Web > https://registry.platformio.org/search?q=header:server.h
*
****************************************************************
#include "server.h"
^~~~~~~~~~
compilation terminated.
Archiving .pio/build/esp32cam/libd19/libAsyncTCP.a
*** [.pio/build/esp32cam/src/main.cpp.o] Error 1
Indexing .pio/build/esp32cam/libd19/libAsyncTCP.a
======================================================================== [FAILED] Took 1.88 seconds ========================================================================
* The terminal process "platformio 'run'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.