Skip to content

Commit

Permalink
Hardware serial example
Browse files Browse the repository at this point in the history
  • Loading branch information
botletics authored Jan 10, 2021
1 parent 590c6f6 commit b10b402
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Code/examples/FTP_Demo/FTP_Demo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -281,19 +281,30 @@ void loop() {

void moduleSetup() {
// SIM7000 takes about 3s to turn on and SIM7500 takes about 15s
// Press reset button if the module is still turning on and the board doesn't find it.
// Press Arduino reset button if the module is still turning on and the board doesn't find it.
// When the module is on it should communicate right after pressing reset

// Software serial:
fonaSS.begin(115200); // Default SIM7000 shield baud rate

Serial.println(F("Configuring to 9600 baud"));
fonaSS.println("AT+IPR=9600"); // Set baud rate
delay(100);
delay(100); // Short pause to let the command run
fonaSS.begin(9600);
if (! fona.begin(fonaSS)) {
Serial.println(F("Couldn't find FONA"));
while(1); // Don't proceed if it couldn't find the device
while (1); // Don't proceed if it couldn't find the device
}

// Hardware serial:
/*
fonaSerial->begin(115200); // Default SIM7000 baud rate
if (! fona.begin(*fonaSerial)) {
DEBUG_PRINTLN(F("Couldn't find SIM7000"));
}
*/

// The commented block of code below is an alternative that will find the module at 115200
// Then switch it to 9600 without having to wait for the module to turn on and manually
// press the reset button in order to establish communication. However, once the baud is set
Expand Down

0 comments on commit b10b402

Please sign in to comment.