Hi,
Today I’m working on an IoT solution using Azure IoT, an Arduino Mega, and an Arduino Nano ESP32. The Arduino Mega has five sensors connected to it, which generate a JSON. I want to use serial communication to send the JSON from the Arduino Mega to the Arduino Nano ESP32, and then have the Nano send it to Azure.
However, I’m not sure how to properly connect and establish communication between the two Arduinos. I’ve tried using TX and RX (TX2 and RX2 from the Arduino Mega to RX0 and TX1 on the Arduino Nano), and also using I2C by connecting the SDA and SCL pins on each board, with a common ground.
I know the Arduino Nano ESP32 works at 3.3V logic levels, so I’m trying to use a TXS0108E level shifter to handle the logic level conversion.
My questions are:
- How should I correctly connect the two Arduinos?
- Is the level shifter really necessary?
- Is it better to use I2C or UART for communication between the two Arduinos?
Thanks in advance for your help!