Do you want to take photos and save them on an SD card, send them over the Internet or set up a video stream right away? Then the ESP32-CAM is a great thing! There is only one circumstance: The board has no USB port. So what to do?
In this tutorial you will learn how to program your ESP32-CAM directly in the Arduino IDE using a USB/Serial adapter. You will need for this:
Preparations in the Arduino IDE
If you have not yet connected the ESP32-CAM to your Arduino IDE, please do so right away. In this tutorial you will learn how to make ESP32 boards available.
When you have done this, you will find the entry AI Thinker ESP32-CAM in the menu Tools > Board – you will need it later.
Programming via an adapter
Since you cannot connect the ESP32-CAM directly to your computer, you need an adapter that allows serial communication via USB. These are also called FTDI adapters – after the company FTDI, which has specialized in these applications.
These adapters are available in many versions from many manufacturers. Above we have linked one that you can switch between 3.3V and 5V – which is very practical.
So to upload a sketch, connect your ESP32-CAM and the FTDI adapter as follows
Here again the connections are clearly displayed:
Important: When you upload a sketch, you must connect pin IO0 on your ESP32-CAM to GND – shown in light blue in the diagram above. To execute the sketch later, disconnect this connection again and press the reset button.
If you have wired the adapter and the ESP32-CAM as described above, connect the adapter to your computer. Then select the board AI Thinker ESP32-CAM and the right port in the Arduino IDE and upload your sketch.
The most common error is the missing connection between IO0 and GND, which you have to make when uploading. If you use a wire for this, check it for its function.
Another source of error can be the USB cable: Can you transfer data with it or does it only supply power? Sometimes problems occur if the wire is too long – just try another one.
If the error must be somewhere else, you may find a solution in the rather extensive documentation at Random Nerd Tutorials.
Letzte Aktualisierung am 2021-01-09 / Affiliate Links / Bilder von der Amazon Product Advertising API