9008620582 info@probots.co.in

Learning how to program the ESP32-CAM AI-Thinker board using the ESP32-CAM-MB micro USB programmer. This is the easiest way to program your ESP32-CAM board.

This micro USB programmer works like a shield that you can attach to the ESP32-CAM board. The programmer comes with a USB socket that you connect directly to your pc.

However, one of the biggest hassles, when you are working with the ESP32-CAM Ai-Thinker module, is uploading code to the board. The AI-Thinker board doesn’t have a built-in USB programmer.

For you to upload the code you had to make tedious connections from the programmer to the ESP32 CAM. But, now you can simply use the ESP32-CAM-MB USB programmer and click the Upload button to successfully program your board. It’s that simple.

The ESP32-CAM  module is an ESP32 development board with an OV2640 camera, microSD card support, on-board flash LED, and several GPIOs to connect peripherals. We are also selling ESP32-CAM-MB + Micro USB Programmer as a combo pack.

ESP32-CAM AI-Thinker MB Programmer

The ESP32-CAM AI-Thinker MB programmer is a shield that you attach to your ESP32-CAM board GPIOs. The following image below shows the programmer and the ESP32-CAM side by side.

The programmer comes with the CH340C USB to serial chip. This allows you to program the ESP32-CAM using the USB port on the shield.

The shield also comes with RESET and BOOT (IO 0) buttons. This may be useful to easily reset the ESP32-CAM or put it into flashing mode.

Program ESP32-CAM using the MB Programmer (Arduino IDE)

To program the ESP32-CAM board with Arduino IDE, you need to have Arduino IDE installed as well as the ESP32 add-on.

Then, simply connect the MB programmer to the ESP32-CAM as shown in the following image.

Then, connect the board to your computer using a USB cable.

After that, in your Arduino-IDE, follow the next steps:

Go to Tools > Board and select AI-Thinker ESP32-CAM. You must have the ESP32 add-on installed. Otherwise, this board won’t show up on the Boards menu.

  • Go to Tools > Port and select the COM port the ESP32-CAM is connected to.

Note: if the board doesn’t show up, it means that you probably don’t have the CH340C drivers installed on your computer. Go to Google and search “CH340C drivers” followed by your operating system and install the drivers.

The code given below is a basic code that will help you to blink the LED on the CAM.

// ledPin refers to ESP32-CAM GPIO 4 (flashlight)
const int ledPin = 4;
void setup() 
{
  // initialize digital pin ledPin as an output
  pinMode(ledPin, OUTPUT);
}
 
void loop() 
{
  digitalWrite(ledPin, HIGH);
  delay(2000);
  digitalWrite(ledPin, LOW);
  delay(2000);
}

This sketch, simply blinks the onboard flash LED.

  • Then, click the Upload button in your Arduino IDE.

You should get a message saying the code was successfully uploaded and your board should start blinking.