I am using a E32-900T20D lora module over UART with an arduino Mega. My logic shifters are configured to convert the 5V mega IO to the 3.3V required by the E32, but to no avail. Running a test script I wrote,
// Define the serial connection using one of the additional hardware serial ports on the Mega
#define E32Serial Serial1
void setup() {
// Begin the serial communication with the baud rate matching your E32 module's configuration
Serial.begin(9600); // Starts the serial communication with the computer
E32Serial.begin(9600); // Starts the serial communication with the E32 module
Serial.println("Arduino is ready");
// Send a message to the E32 module
E32Serial.println("Hello E32");
}
void loop() {
// Check if the E32 module has sent any message
if (E32Serial.available()) {
String fromE32 = E32Serial.readStringUntil('\n');
Serial.print("Received from E32: ");
Serial.println(fromE32);
}
// Check if the computer has sent any message to Arduino
if (Serial.available()) {
String fromComputer = Serial.readStringUntil('\n');
// Send the computer's message to the E32 module
E32Serial.println(fromComputer);
}
// Add a delay to prevent overwhelming the serial buffer
delay(100);
}
shows no output.
Arduino Mega: RX1 -> Level Shifter (High) RX1
Arduino Mega: TX1-> Level Shifter (High) TX0
Arduino Mega: 3.3V to left hand rail , first hole to input it in (top left hole) (+ve rail)
Arduino Mega: 5V to right hand rail , first hole to input it in (top left hole in the rail) (+ve rail)
Arduino Mega: GND to left hand rail, bottom right hole (-ve rail)
Arduino Mega: GND2 to right hand rail, bottom right hole (-ve rail)
E32 : TXD -> Level Shifter (Low) RX0
E32 : RXD -> Level Shifter (Low) TX1
E32: VCC -> Plug under Arduino Mega 3.3V left hand rail of breadboard (+ve rail)
E32: GND-> Plug above Arduino Mega GND left hand rail of breadboard (-ve rail)
Level shifter: HV (5V) -> 5V rail ( plug under input power plug from mega)
Level shifter: GND (5V) -> 5V rail ( plug aboce output GND plug from mega)
Level shifter: GND (3.3V) -> 3.3V rail ( plug aboce input power plug from mega)
Level shifter: GND (3.3V) -> 3.3Vrail ( plug above output GND plug from mega)
My level shifter has no plugs labelled HV or LV, but instead has HV TX0, RX1 for high volt and LV TX1, RX0 for low volt.