Hello,
I have got the basics working with an Arduino Nano, to communicate with a SIM800L module (EDIT: V2 SIM800L module). I can communicate with the SIM800L with the AT commands perfectly fine. No power issues with the SIM800L, all working fine with the Arduino Nano.
I have switched to the Teensy, because I want to use a Teensy and learn how to use it, and I cannot get the SIM800L working.
I have made the following connections:
SIM800L RX -> Teensy 4.0 Pin 7
SIM800L TX -> Teensy 4.0 Pin 8
I used this to determine the pins required:
Using the following basic code, that works with the Arduino Nano, I cannot get the Teensy to work. I have got the blink code working on the Teensy, so I assume it is not an issue with the Teensy. Most likely it is an issue with my code or understanding of how the Teensy is slightly different. Please could anyone help?
#define SIM800L Serial2 //RX is pin 7, TX is pin 8.
void setup() {
// Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(9600);
// Begin serial communication with SIM800L
SIM800L.begin(9600);
SIM800L.println("AT");
delay(100);
}
void loop() {
// If there's any serial available, read it and send it out
// SIM800L's UART (Serial Monitor)
if (Serial.available()) {
SIM800L.write(Serial.read());
}
// If there's any serial available from SIM800L, read it and send it out
// through Arduino's UART (Serial Monitor)
if (SIM800L.available()) {
Serial.write(SIM800L.read());
}
}