I am trying to understand how to connect an ESP32's UART pins to my raspberry pi 3B+'s I2C pins. I see several bridge chips available for this like TI's MSP430 Datasheet. But I am not very circuit savvy so I am having a difficult time. The pins I need to use on the ESP32 are: GPIO 9 and 10, RX and TX respectively (UART1). On the Raspberry Pi: GPIO 2 and 3, SDA and SCL respectively. Does anyone know answers to the questions below?
Besides connecting the RPi, ESP, Vcc, GND pins to the bridge at the correct I/O positions on the chip, what additional circuitry would be needed to make good communication?
What the ESP32 code would look like (Arduino IDE)?
What the Pi's code would look like (python)?