Hello,
I have been trying to get the LTE Cat M1/NB-IoT Shield to work with my Arduino Uno Rev2, but when running the first example file(Example 0) from the [shield’s hookup guide I run into what Arduino IDE seems to think are syntax errors in the SparkFun_LTE_Shield_Arduino_Library.h file.
What could I be doing wrong? Because to me, nothing in the src file looks out of the ordinary…
I will also include the error message:
In file included from c:\users\danielius230\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\io.h:99:0,
from c:\users\danielius230\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\avr\include\avr\pgmspace.h:90,
from C:\Users\danielius230\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/String.h:31,
from C:\Users\danielius230\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/IPAddress.h:24,
from C:\Users\danielius230\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/api/ArduinoAPI.h:30,
from C:\Users\danielius230\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\cores\arduino/Arduino.h:23,
from C:\Users\danielius230\AppData\Local\Temp\arduino-sketch-7FB669913E7EC8CC870C882E37B7B45F\sketch\00_Register_Operator.ino.cpp:1:
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:250:9: error: expected identifier before '(' token
GPIO1 = 16,
^
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:250:9: error: expected '}' before '(' token
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:250:9: error: expected unqualified-id before 'volatile'
GPIO1 = 16,
^
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:250:9: error: expected ')' before 'volatile'
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:250:9: error: expected ')' before 'volatile'
In file included from C:\Users\danielius230\AppData\Local\Temp\.arduinoIDE-unsaved2023611-8508-xjh31k.ou158\00_Register_Operator\00_Register_Operator.ino:27:0:
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:281:54: error: expected ')' before 'gpio'
LTE_Shield_error_t setGpioMode(LTE_Shield_gpio_t gpio, LTE_Shield_gpio_mode_t mode);
^~~~
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:281:83: error: expected primary-expression before 'mode'
LTE_Shield_error_t setGpioMode(LTE_Shield_gpio_t gpio, LTE_Shield_gpio_mode_t mode);
^~~~
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:282:58: error: expected ')' before 'gpio'
LTE_Shield_gpio_mode_t getGpioMode(LTE_Shield_gpio_t gpio);
^~~~
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:282:62: error: cannot convert 'LTE_Shield' to 'LTE_Shield_gpio_mode_t' in initialization
LTE_Shield_gpio_mode_t getGpioMode(LTE_Shield_gpio_t gpio);
^
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:326:1: error: expected unqualified-id before 'private'
private:
^~~~~~~
C:\Users\danielius230\Documents\Arduino\libraries\SparkFun_LTE_Shield_Arduino_Library-master\src/SparkFun_LTE_Shield_Arduino_Library.h:395:1: error: expected declaration before '}' token
};
^
exit status 1
Compilation error: exit status 1