I wanted to try out an image recognition code I found online (https://github.com/edgeimpulse/example-esp32-cam/tree/main/Examples/Basic-Image-Classification). It will allow me to deploy an Edge Impulse model to the ESP32 Cam to recognize images (in this case, apples, bananas and potatoes). I add the model into the Basic-Image-Classification.ino file which we can get as a zipped file from Edge Impulse.
However, I get two errors.
Multiple libraries were found for "WiFi.h"
Used: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
fork/exec C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-gcc.exe: The filename or extension is too long.
Error compiling for board AI Thinker ESP32-CAM.
How can I fix this? I am not sure which error to look into first.
The solution is to set your temporary build directory to something quite short like "C:\m" vs. having things way down under the user: C:\Users\user\AppData\Local\Arduino15\...
If you are using an older version of the Arduino IDE, you should try updating to 1.8.19. The developers did some work to avoid this Windows command length error sometime in the last couple of years and I have not seen any reports from people experiencing it with the recent IDE versions.