ESP32 Cam

ESP32 Cam by Espressif

Connection Type
Number of servos
Audio Support
Camera Support

The Esp32 Cam is an affordable WiFi module with few I/O and streaming webcam capability. Adding this firmware to an esp32 cam, the WiFi module will become an EZB that ARC can connect to stream the camera and control gpio. Check below for the ports that work and don’t interfere with the camera.

*Note: On the AI Thinker edition, servos work on D2, D12, D13, D14, and D15. However, you will need to try your edition/model to see if those pins work. If not, try ones that do

*Note: It’s important to note that while the esp32 cam has an ezb firmware, some models share the same gpio in the pinout as the camera uses. This allows the camera to work but prevents the esp32 from being used as an ezb io controller due to their short-sighted design flaws.

How to use an ESP32 Cam

  1. In the Arduino IDE, add this link to File->Preferences->Libraries:
  2. In the Arduino IDE, load the Board Manager, search for "ESP32 by Espressif Systems" and select INSTALL.
  3. Download the firmware from this page to your computer and extract it into a folder.
  4. Edit the source code firmware in the Arduino IDE and view the WiFi mode settings. You can choose between AP or Client mode. The appropriate settings for each method may be configured as well. Follow the instructions in the firmware code for configuring the WiFi modes.
  5. Programming the ESP32 device depends on the model version. Some have USB, and others require connecting through an Arduino UNO or USB TTL UART converter. Google "how to program an ESP32 Cam" for online tutorials.
  6. View the status of the connection in the Arduino Serial Monitor set to 115,200 baud. Depending on your WiFi settings, you will see the WiFi connection status.
  7. Load ARC and connect to the ESP32 directly via WiFi if it is in AP Mode; otherwise, connect to the same network as Client Mode. The default IP Address for AP Mode will be In Client mode, you must view the Serial Debug Monitor in Arduino IDE or check your router DHCP client list.

WiFi Modes

Two WiFi modes can be configured in the code. They are AP Mode, which turns the ESP32 Cam into a WiFi server your computer connects directly to. The other mode is Client Mode, in which the ESP32 Cam connects to your network router. Get the IP Address and connection status information by viewing the Serial Monitor set to 115,200 in Arduino IDE.

Port Configuration

The pins in ARC are labeled D0 - D23. The ESP32 has GPIO labeled pins, which are not in any ordered sequence. This translation chart below shows the mapping of the ESP GPIO to ARC Dx pins. All Dx ports are mapped to GPIOx ports. So GPIO1 is D1, and GPIO2 is D2, etc.


Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

#1   — Edited

Would like to see a video of this working with Arc

I did get the camera working with a FTDI adapter and Arduino code I found

works great



@EZAng, you've asked this question a number of times in various threads. Please do not repeat across threads 

Your question was answered here:

User-inserted image

#3   — Edited

Thank DJ

followed your instruction above

I got the ESP32 cam working on ARC also now

Used the FTDI adapter to upload, same setting as when I used the Arduino code instructions..



On this chart, where are the DX pins?

User-inserted image


D1 = gpio1 d2 = gpio2 d3 = gpio3  etc

#6   — Edited

*Note: For servo use with EZ-Cam, only pins D2, D12, D13, D14, D15 are recommended.

Tried D12 with GPIO 12 - just got the servo to work -

Camera works good


Find ports that work with your version. They're all different. All versions of the ESP 32 cam are different.

#8   — Edited

In the esp32 Cam:

Tried D12 with GPIO 12 - D13, and D15 work also

Camera and servos work


What esp32cam do you use? That’ll be worth mentioning so it adds context to the list of ports you’re providing


this is the camera I purchased;


that looks the same as mine. Strange

Nink, what version is yours? Does it look the same?


I found some Arduino code that makes a webserver, form serial monitor I get, put it in a browser, I get this: User-inserted image when I click start stream on bottom, I get the camera's video, also I can put this in my Iphone's browser - I can see the camera video on the phone

If you want the code just let me know

Unknown Country

I am new in this, and trying to setup ESP32 Cam for ARC use. There is problem during compilation of ESP32 Cam firmware in Arduino IDE, on the end I get lot of error messages

Arduino: 1.8.19 (Windows 10), Board: "AI Thinker ESP32-CAM, 240MHz (WiFi/BT), QIO, 80MHz"

C:\EZ-ESP32-CAM\EZ-ESP32-CAM.ino:119:24: warning: passing NULL to non-pointer argument 1 of 'WiFiClient::WiFiClient(int)' [-Wconversion-null]

WiFiClient _CLIENT = NULL;


C:\EZ-ESP32-CAM\EZ-ESP32-CAM.ino:120:27: warning: passing NULL to non-pointer argument 1 of 'WiFiClient::WiFiClient(int)' [-Wconversion-null]



C:\EZ-ESP32-CAM\EZ-ESP32-CAM.ino: In function 'void doEZProtocol()':

EZ-ESP32-CAM:755:49: error: call of overloaded 'analogWrite(byte&, long int)' is ambiguous

   analogWrite(port, map(pos, 0, 100, 0, 255));


In file included from C:\Users\kirop\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\cores\esp32/Arduino.h:36,

             from sketch\EZ-ESP32-CAM.ino.cpp:1:

C:\Users\kirop\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\cores\esp32/esp32-hal.h:93:6: note: candidate: 'void analogWrite(uint8_t, int)'

void analogWrite(uint8_t pin, int value);


In file included from C:\EZ-ESP32-CAM\EZ-ESP32-CAM.ino:16:

C:\EZ-ESP32-CAM\analogWrite.h:9:8: note: candidate: 'void analogWrite(uint8_t, uint16_t)'

void analogWrite( uint8_t APin, uint16_t AValue );


Multiple libraries were found for "WiFi.h"

Used: C:\Users\kirop\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\libraries\WiFi

Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

exit status 1

call of overloaded 'analogWrite(byte&, long int)' is ambiguous

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.


Hey @DJ  Just downloaded this version and the serial monitor isn't showing my IP and ezb scanner can't find so had to login to my router (and that's fine) what is strange when I connect and disconect it shows the wrong IP of the host it shows an 80.163.252.XXX address.  I removed the last digits cause not sure what it is but its not me and it appears to be Denmark?

16:26:24.857 -> Client ezb connected from 80.163.252.XXX 16:26:24.857 -> EZB Client disconnected 16:26:24.898 -> Waiting for ezb client... 16:27:43.922 -> Client ezb connected from 80.163.252.XXX 16:28:15.861 -> EZB Client disconnected 16:28:15.908 -> Waiting for ezb client... 16:28:54.883 -> Client ezb connected from 80.163.252.XXX 16:29:20.268 -> Client cam connected from

Unknown Country

I can not compile the firmware in arduino and receive below error. Any advice on this?

call of overloaded 'analogWrite(byte&, long int)' is ambiguous

analogWrite(port, map(pos, 0, 100, 0, 255));


Sometimes arduino ide’s change some things. Usually this error pops up a lot. You will need to cast the value to a byte (byte). Not sure why some ide’s do that. But I guess that’s why it’s free


DJ, So how should this call be changed to correct the following error?  So I can get this to compile correctly?

/Users/shawn/Documents/Arduino/EZ_ESP32_CAM/EZ_ESP32_CAM.ino: In function 'void doEZProtocol()':
/Users/shawn/Documents/Arduino/EZ_ESP32_CAM/EZ_ESP32_CAM.ino:755:49: error: call of overloaded 'analogWrite(byte&, long int)' is ambiguous
       analogWrite(port, map(pos, 0, 100, 0, 255));

Answered above. Cast port to a byte. Or map to a byte. One of the two needs to be a byte with your compiler.

#19   — Edited

So I changed it to this and it compiled... :D

analogWrite(port, byte(map(pos, 0, 100, 0, 255)));

Haha man arduino is so weird. So byte() is also a function? That’s hilarious

I would have expected traditional C to be

analogWrite(port, (byte)map(pos, 0, 100, 0, 255));

but they have a byte() and probably an int() and such ha too funny