Hi,
I am using this sim800L module:
And a Arduino Mega 2560, I'm connecting them this way since the module's logic is 3.3v and not 5v tolerant:
And I'm just trying to connect with the module via AT commands, I saw a lot of tutorials and they use the SoftwareSerial library even if they are using the Mega with 4 UARTs and if I try it like that it works but I want to connect it in the UART pins.
This is the code I'm using:
void setup() {
Serial.begin(9600);
Serial2.begin(9600);
}
void loop() {
if (Serial2.available())
{
Serial.write(Serial2.read());//Forward what Serial received to Software Serial Port
}
if(Serial.available())
{
Serial2.write(Serial.read());//Forward what Software Serial received to Serial Port
}
}
But when I run it and send "AT" I read this:
Any ideas what may be wrong?
Thank you!