Hello everyone, i want to ask if someone knows how to communicate arduino uno with esp32CAM (serial communication). In this moment i can program the ESP32CAM via arduino, but i cant make them communicate. I used a level converter (5V to 3.3V), and the TX and RX ports from both of them. Its important to say this again, is ESP32 CAM, not ESP32, they are quite different, thank you in advance! (PD: i have tried a lot of things, nothing has functioned)
Please post your sketches and a wiring diagram.
Can you post your code. and a picture of how everything is connected.
Make sure TX of one goes to RX of the other.
Well, this is the connection diagram. Strangely to correctly program the ESP, the UoT pin of ESP has to be connected to TX of arduino and UoR to RX, otherwise doesnt connect. So i think if i can succesful program the ESP the wiring diagram is not the problem (even i can use the camera and connect it with Firebase). I tried a lot of codes (for example Hardware serial and software serial) and non of them worked. When i try to see the data in the serial monitor this happen: 1) arduino's reset pin is grounded so arduino just dont send or recibe data and the ESP32CAM show data in the monitor. 2) if is not grounded arduino start showing data, but ESP32CAM "friezes" (its like arduino start working and dosnt let esp32cam use the serial monitor, but the ESP is still working, for example with firebase or turning leds on/off), in other words its like they cannot use the serial monitor at the same time. As you can see im not posting code by now, cause i dont really know what to do. Sorry if i cant explain myself better and for my poor english.PD: in my opinion the problem is that they are sharing the USB serial, but i dont really know.
Normally Tx to Rx and Rx to Tx.
What does "connect" mean?
Why do you have RESET connected to GND on the Uno?
Why do you have GPIO0 connected to GND on the ESP?
Probably not a good idea to try and use the same connection for the serial monitor. How can you have both devices connected to the serial monitor at the same time?
The Reset Button goes to GND when you try to program the ESP32CAM, when is programmed its not necesary. The same goes to GPIO0, its needed when programming.
Yeah , i dont know if you can have both devices in the same serial monitor, but i dont know how to do it separately without using more hardware. The thing is that i want to comunicate ESP with arduino for example to send some calculated data from arduino to the ESP32CAM vía RX and TX and this device to internet, im using 2 development boards because i need more pins (analogics, digital, and some special pins), and ESP32CAM is short of sketch memory when you use the cam and for example firebase. If you have some clue to how to reach this, please feel free to share ideas , thank you so much
Get rid of the Uno and switch to a Teensy 3.2. It's more powerful, has more memory, has multiple Hardware UART ports available, and runs on 3.3V so you don't need the level shifters.
You can try this article on Serial Communication Between Arduino and ESP32 CAM.
when I connected a ESP32-CAM to a Mega I used the connections so
and the following test program on the ESP32-CAM
// ESP32-CAM Serial1 test
// for loopback test connect pins 14 and 15
#define RXD1 14
#define TXD1 15
void setup() {
// initialize both serial ports:
Serial.begin(115200);
Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
Serial.println();
Serial.println("serial1 test Rx pin 14 Tx pin 15");
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
//Serial.write(inByte);
Serial1.write(inByte);
}
}
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.