In this tutorial you will learn how to set up the Arduino IDE to program the Freenove ESP32-WROVER CAM board. The board is comparable to the ESP32-CAM with an OV2640 camera and an SD Card interface, but provides more GPIO pins and is easier to program than the older ESP32-CAM boards.
Required Parts
You will need a Freenove ESP32-WROVER CAM board to follow this tutorial. Typically the board comes with extras such as an SD Card, an SD Card Reader and a USB-C cable, but in case that they are missing, I have linked them below as well.
ESP32-WROVER CAM
USB C Cable
SD Card Reader
MicroSD Card 16GB
Arduino IDE
Makerguides is a participant in affiliate advertising programs designed to provide a means for sites to earn advertising fees by linking to Amazon, AliExpress, Elecrow, and other sites. As an Affiliate we may earn from qualifying purchases.
Features of the Freenove ESP32-WROVER CAM board
The Freenove ESP32-WROVER CAM board features a Dual-core 32-bit microprocessor (ESP32-Wrover-E chip) with 80~240 MHz and 520KB SRAM, a 4 MB Flash, an 8 MB PSRAM, an onboard 2.4 GHz Wi-Fi and Bluetooth 4.2 (LE), a microSD card slot, and a OV2640 camera. The picture below shows the front and the back of the board:
Note that the older 1.x version of the board lacked the microSD card slot but the current 3.x version has one.
The board has a micro-USB port and a built-in USB-to-UART converter (CH340), which means it is easy to upload code. Just connect the board via a USB cable to your PC and use the Arduino IDE to write and download code.
In contrast to some older ESP32-CAM boards, no manual resting of the board to enter download mode or an FTDI programmer are required. Another advantage over the ESP32-CAM is also that there are more free GPIO pins available.
The board comes with a Github Repo that contains documentation and programming examples in C and Python. You can also download the ZIP-file with the documentation and examples. And here is a link to the Datasheet for the Wrover chip.
LEDs
The ESP32-WROVER board has four built-in LEDs. The green ON LED indicates that the board has power. The blue LED, labelled IO2, is connected to GPIO2 and can be user controlled. RX and TX (yellow LEDs) indicating the transfer of serial data. The picture below shows the four LEDs on the board:
Pinout
A nice feature of the board is that the pins are annotated on the silkscreen whether they are used by the Camera (-), the SD Card (~) or the PSRAM (*). You can a see a close-up of some of the pins with their markings in the picture below:
This is very helpful when you are looking for freely available GPIO pins, since you can’t use the marked pins if the Camera or the SD card is in use. The following picture shows the full pinout of the board (click on it for a bigger picture):
Strapping Pins
Note that apart from pins that are used by the Camera or the SD card, there are also five strapping pins: MTDI, GPIO0, GPIO2, MTDO and GPIO5. You should be careful when using these pins, since they need to be in a certain state when the board resets. The following table shows the Strapping Pins and their function:
After the reset is complete, the strapping pins can operate as normal GPIO pins but you have to make sure that they are connected to an high-impedance external circuit during reset otherwise your board might not boot properly.
Preparing Arduino IDE for ESP32-WROVER CAM
If you want to program the ESP32-WROVER CAM from the Arduino IDE you need to be able to communicate with the board and have the software (core) for the board installed. In the next two sections we will explain what you need to do.
Install CH340 driver
The ESP32-WROVER CAM board communicates via a CH340 chip that allows you to program the board over USB. If you have never programmed any other non-Arduino boards you may have to install the CH340 driver. Here is a link to the driver software for the CH340 for your operating system (Windows, Mac, Linux).
Under Windows you can check or verify if the CH340 is installed by opening the Device Manager and searching under Ports for the USB-SERIAL CH340 port as shown below. This will only work if you have your board connected to your PC using the USB cable.
If not then download the driver from the Repo, e.g. CH341SER.EXE for Windows, run it and click on INSTALL
:
Then check again in the Device Manger, if the driver is installed and the board is connected to a COM port.
Install ESP32 Core
Next we need to install the ESP32 Core to enable support for ESP32 boards within the Arduino IDE. Installing the ESP32 Core is simple, however. Just start your Arduino IDE and follow the steps outlined below. If you have issues, you can find more detailed instructions in our tutorial How to Program ESP32 with Arduino IDE.
Additional boards manager URLs
First open the Preferences dialog by selecting “Preferences…” from the “File” menu:
This will open the Preferences dialog shown below. Under the Settings tab you will find an edit box at the bottom of the dialog that is labelled “Additional boards manager URLs“:
In this input field copy the following URL: “https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
“
This will let the Arduino IDE know, where to find the ESP32 core libraries. Next we will actually install the ESP32 core libraries using the Boards Manager.
Boards Manager
Open the BOARDS MANAGER by clicking on the board icon in the sidebar of the Arduino IDE:
You will see the BOARDS MANAGER appearing right to the Sidebar. Enter “ESP32” in the search field at the top and you should see two types of ESP32 boards; the “Arduino ESP32 Boards” and the “esp32 by Espressif” boards. We want the esp32 libraries by Espressif. Click on the INSTALL button and wait until the download and install is complete.
Once installed, your Boards Manager should look like this, though the actual version (here 3.0.0-a) might be different.
In the next step, I show you how to select the ESP32 board for the ESP32-WROVER CAM.
Select ESP32 Wrover Module
Click on the selector for boards. In the example below, it shows an Arduino Uno as selected board (we will change that):
Clicking on the name of the currently selected board (Arduino Uno), will open the board selection dialog. In the search box type “wrover” and select the “ESP32 Wrover Module” as shown below:
If the board is connected to your PC via USB, you should also be able to select the COM port. In the screenshot above this is COM5 but in your case it might be another COM port.
Program the ESP32-WROVER CAM
If you were able to select the ESP32 Wrover Module as board and the connection to a COM port is working, you can now program your ESP32-WROVER CAM board.
Blink
As a simple test we download the usual Blink program. The user-controllable, on-board LED of the ESP32-WROVER CAM board is connected to GPIO 2. We therefore set the ledPin
constant to 2 and then turn on the LED for one second and turn it off for another second:
const byte ledPin = 2; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000); }
If this works then congratulations! You have successfully programmed your ESP32-WROVER CAM. In the next section, I will show you how to run the WebServer example that allows you to stream video to your computer.
Video Streaming WebServer
In your Arduino IDE go to File -> Examples -> ESP32 -> Camera and open the CameraWebServer example:
Next, you will have to change the code in CameraWebServer.ino
slightly. Remove the comment signs //
for the definition of the CAMERA_MODEL_WROVER_KIT and make sure all other camera definitions are commented out as shown below:
In the same file, a bit further down, you also have to enter the Wi-Fi credentials of your home Wi-Fi network. Replace SSID
and PASSWORD
by your network credentials for the following constants:
After uploading the code to your ESP32-WROVER CAM you should see the following text in the Serial Monitor:
CameraWebServer
Note the last line, which provides you with the URL (IP address) the WebServer is running at. Copy and paste this URL into the address bar of your browser (it will be different for your board).
You should then see the following website that streams camera pictures from your ESP32-WROVER Camera to your Web browser:
CameraWebServer
in Web browserRemember to press “Start Stream” at the bottom of the page to start the video streaming. In the picture above the stream is already started and the button says “Stop Stream”.
Feel free to play with the different camera settings. You will note that the framerate gets quite low for higher resolution images.
Conclusions
In this tutorial you learned how to program the ESP32-WROVER CAM board. I showed you only the Blink program and the WebServer as examples but the Github repo has more Code examples for the ESP32-WROVER CAM, especially around Wi-Fi and Bluetooth.
Compared with ESP32-CAM, the ESP32-WROVER CAM has the advantage that more GPIO pins are free to use and that programming of the board does not required additional hardware, such as a programming shield or a FTDI Programmer.
On the other hand, the ESP32-CAM is smaller, cheaper and has a flash LED, which is a clear benefit for some projects. If you need an even smaller board, have a look at the XIAO-ESP32-S3-Sense. It lacks the flash LED but has more free GPIOs, which would allow to add a flash LED.
If you have any questions feel free to leave them in the comment section.
Happy Tinkering 😉
Stefan is a professional software developer and researcher. He has worked in robotics, bioinformatics, image/audio processing and education at Siemens, IBM and Google. He specializes in AI and machine learning and has a keen interest in DIY projects involving Arduino and 3D printing.