SparkFun_LTE_Shield_Arduino_Library icon indicating copy to clipboard operation
SparkFun_LTE_Shield_Arduino_Library copied to clipboard

Does Not Compile for SAMD21 Dev Board

Open robomike opened this issue 5 years ago • 1 comments

Arduino: 1.8.12 (Linux), Board: "Arduino M0"

00_Register_Operator:33:1: error: 'SoftwareSerial' does not name a type; did you mean 'HardwareSerial'? SoftwareSerial lteSerial(8, 9); ^~~~~~~~~~~~~~ HardwareSerial /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino: In function 'void setup()': 00_Register_Operator:43:25: error: 'lteSerial' was not declared in this scope #define LTEShieldSerial lteSerial ^ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:84:18: note: in expansion of macro 'LTEShieldSerial' if ( lte.begin(LTEShieldSerial, 9600) ) { ^~~~~~~~~~~~~~~ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:43:25: note: suggested alternative: 'Serial' #define LTEShieldSerial lteSerial ^ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:84:18: note: in expansion of macro 'LTEShieldSerial' if ( lte.begin(LTEShieldSerial, 9600) ) { ^~~~~~~~~~~~~~~ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino: In function 'void loop()': 00_Register_Operator:43:25: error: 'lteSerial' was not declared in this scope #define LTEShieldSerial lteSerial ^ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:171:7: note: in expansion of macro 'LTEShieldSerial' if (LTEShieldSerial.available()) { ^~~~~~~~~~~~~~~ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:43:25: note: suggested alternative: 'Serial' #define LTEShieldSerial lteSerial ^ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:171:7: note: in expansion of macro 'LTEShieldSerial' if (LTEShieldSerial.available()) { ^~~~~~~~~~~~~~~ 00_Register_Operator:43:25: error: 'lteSerial' was not declared in this scope #define LTEShieldSerial lteSerial ^ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:175:5: note: in expansion of macro 'LTEShieldSerial' LTEShieldSerial.write((char) SerialMonitor.read()); ^~~~~~~~~~~~~~~ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:43:25: note: suggested alternative: 'Serial' #define LTEShieldSerial lteSerial ^ /tmp/arduino_modified_sketch_390629/00_Register_Operator.ino:175:5: note: in expansion of macro 'LTEShieldSerial' LTEShieldSerial.write((char) SerialMonitor.read()); ^~~~~~~~~~~~~~~ exit status 1 'SoftwareSerial' does not name a type; did you mean 'HardwareSerial'?

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

robomike avatar Feb 29 '20 18:02 robomike

Hi robomike,

I was having the same problem. I was able to get the register sketch to compile and upload to a SAMD board by doing the following:

  • Comment out line 34:
//SoftwareSerial lteSerial(8, 9);
  • Changes lines 43 and 44 to:
#define SerialMonitor SerialUSB
#define LTEShieldSerial Serial1

simonguest avatar Apr 14 '20 00:04 simonguest