Thank you very much for the reply Max,
ok - I’ve done that and now it no longer complains about missing header files! One step forward…
I’m however presented with a raft of warnings (in yellow)? and some errors in red.
The compiler doesn’t seem to see the functions in the main.cpp it compiles ok in Arduino and I thought using the same framework it would be the same or are there different syntax arrangements for platformio?
I really wan to get into Platformio but the learning curve is proving painful, I’ve gone through all the tutorials and read some of the manual but just getting my 1st project to compile is hard.
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/uno.html
PLATFORM: Atmel AVR 2.0.0 > Arduino Uno
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 31.50KB Flash
PACKAGES: toolchain-atmelavr 1.50400.190710 (5.4.0), framework-arduino-avr 5.0.0
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 15 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Adafruit FONA Library> 1.3.3
|-- <SoftwareSerial> 1.0
Building in release mode
Compiling .pio\build\uno\src\main.cpp.o
Compiling .pio\build\uno\lib328\Code\Adafruit_FONA.cpp.o
Compiling .pio\build\uno\lib47b\SoftwareSerial\SoftwareSerial.cpp.o
Archiving .pio\build\uno\libFrameworkArduinoVariant.a
Compiling .pio\build\uno\FrameworkArduino\CDC.cpp.o
In file included from lib\Code\includes/platform/FONAPlatStd.h:32:0,
from lib\Code\includes/platform/FONAPlatform.h:31,
from lib\Code\Adafruit_FONA.h:22,
from lib\Code\Adafruit_FONA.cpp:19:
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::sendUSSD(char*, char*, uint16_t, uint16_t*)':
C:\Users\simon.jowett\.platformio\packages\framework-arduino-avr\cores\arduino/Arduino.h:92:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define min(a,b) ((a)<(b)?(a):(b))
^
lib\Code\Adafruit_FONA.cpp:829:28: note: in expansion of macro 'min'
uint16_t lentocopy = min(maxlen-1, strend - p);
^
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::getTime(char*, uint16_t)':
C:\Users\simon.jowett\.platformio\packages\framework-arduino-avr\cores\arduino/Arduino.h:92:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define min(a,b) ((a)<(b)?(a):(b))
^
lib\Code\Adafruit_FONA.cpp:893:24: note: in expansion of macro 'min'
uint16_t lentocopy = min(maxlen-1, (int)strlen(p));
^
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::getGPS(float*, float*, float*, float*, float*, uint16_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, float*)':
lib\Code\Adafruit_FONA.cpp:1081:11: warning: variable 'tok' set but not used [-Wunused-but-set-variable]
char *tok;
^
In file included from lib\Code\includes/platform/FONAPlatStd.h:32:0,
from lib\Code\includes/platform/FONAPlatform.h:31,
from lib\Code\Adafruit_FONA.h:22,
from lib\Code\Adafruit_FONA.cpp:19:
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::getGSMLoc(uint16_t*, char*, uint16_t)':
C:\Users\simon.jowett\.platformio\packages\framework-arduino-avr\cores\arduino/Arduino.h:92:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
#define min(a,b) ((a)<(b)?(a):(b))
^
lib\Code\Adafruit_FONA.cpp:1661:24: note: in expansion of macro 'min'
uint16_t lentocopy = min(maxlen-1, (int)strlen(p));
^
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::postData(const char*, const char*, const char*, const char*, uint32_t)':
lib\Code\Adafruit_FONA.cpp:1723:23: warning: comparison with string literal results in unspecified behaviour [-Waddress]
if (request_type == "GET") {
^
lib\Code\Adafruit_FONA.cpp:1727:28: warning: comparison with string literal results in unspecified behaviour [-Waddress]
else if (request_type == "POST" && bodylen > 0 ) { // POST with content body
^
lib\Code\Adafruit_FONA.cpp:1742:52: warning: format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t {aka long unsigned int}' [-Wformat=]
sprintf(dataBuff, "AT+HTTPDATA=%d,10000", bodylen);
^
lib\Code\Adafruit_FONA.cpp:1754:28: warning: comparison with string literal results in unspecified behaviour [-Waddress]
else if (request_type == "POST" && bodylen == 0) { // POST with query parameters
^
lib\Code\Adafruit_FONA.cpp:1758:28: warning: comparison with string literal results in unspecified behaviour [-Waddress]
else if (request_type == "HEAD") {
^
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::postData(const char*, uint16_t, const char*, const char*, const char*)':
lib\Code\Adafruit_FONA.cpp:1793:13: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses]
if (_type == SIM7500A | _type == SIM7500E || _type == SIM7600A || _type == SIM7600C || _type == SIM7600E) {
^
lib\Code\Adafruit_FONA.cpp:1827:13: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses]
if (_type == SIM7500A | _type == SIM7500E || _type == SIM7600A || _type == SIM7600C || _type == SIM7600E) {
^
lib\Code\Adafruit_FONA.cpp:1858:13: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses]
if (_type == SIM7500A | _type == SIM7500E || _type == SIM7600A || _type == SIM7600C || _type == SIM7600E) {
^
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::MQTTunsubscribe(const char*)':
lib\Code\Adafruit_FONA.cpp:2416:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::MQTTreceive(const char*, const char*, int)':
lib\Code\Adafruit_FONA.cpp:2420:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA::MQTTdisconnect()':
lib\Code\Adafruit_FONA.cpp:2424:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
lib\Code\Adafruit_FONA.cpp: In member function 'boolean Adafruit_FONA_LTE::MQTT_dataFormatHex(bool)':
lib\Code\Adafruit_FONA.cpp:2495:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
src\main.cpp: In function 'void setup()':
src\main.cpp:106:11: error: 'powerOn' was not declared in this scope
powerOn(); // See function definition at the very end of the sketch
^
src\main.cpp: In function 'void loop()':
src\main.cpp:239:72: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} while ((*bufPtr++ != '\n') && (fona.available()) && (++charCount < (sizeof(fonaNotificationBuffer)-1)));
^
src\main.cpp:266:46: error: 'sendText' was not declared in this scope
sendText("Treasure chest unlocked!");
^
src\main.cpp:271:42: error: 'sendText' was not declared in this scope
sendText("Opening secret door!");
^
src\main.cpp:283:31: error: 'sendText' was not declared in this scope
sendText(textMessage);
^
Archiving .pio\build\uno\lib47b\libSoftwareSerial.a
*** [.pio\build\uno\src\main.cpp.o] Error 1