Arduino Uno and Wemos ESP-32 S2 Mini Communication

I am trying to send a message from an Arduino Uno to a Wemos ESP-32 S2 Mini. I looked into Serial Communication but the ESP-32 does not seem to support it unless I am mistaken. Are there any other methods to achieve this?

Look harder, ESP32 most certainly does support at least 3 or 4 types of serial connections that I can think of.

Why do you need both? The ESP32 should be able to hand most jobs and Uno can.

I looked through the schematics for it and I did not see any RX/TX pins available to use for it. The schematic shows that the chip has it for pins IO44 and IO43 but those are not present in the pins available shown at the bottom of the schematic. The pins only go up to IO40.

Here is the schematic provided by Wemos:

I am going to use the Arduino to connect to multiple sensors that will then transmit the data from them to the esp

You can use port expanders and/or shift registers to handle any of that without the Uno and it will be faster.

That board has the following serial connections I2C, SPI, UART, USB OTG, as well as software serial.

Look for other projects that use that board for examples.

According to this
C:\Users\YourName\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\variants\lolin_s2_mini\pins_arduino.h

I/O 39/37 are RX/TX pins.

I am not clear if it will accessed with Serial0 or Serial1.

On the ESP32, just about any GPIO pin can be assigned to be UART serial RX or TX. I don't know if this applies to the S2, but imagine that it does.

Example:

//Serial port echo
// DEV MODULE selected for ESP32-CAM
// works as expected with UART2, RX=14, TX=15
// same for UART1

#include <HardwareSerial.h>
HardwareSerial SerialPort(1); // use UART1
void setup()  
{
  Serial.begin(115200);
  while (!Serial);
  Serial.println("Serial test");
  SerialPort.begin(115200, SERIAL_8N1, 14, 15); 
} 
void loop()  
{ 
  while (Serial.available()) {
    SerialPort.write(Serial.read());
  }
  while (SerialPort.available()) {
    Serial.write(SerialPort.read());
  }
}

looking at Wemos ESP-32 S2 Mini documentation it has 27 IO pins
any particular reason why you cannot connect your sensors to the S2 mini and drop the UNO?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.