diff --git a/.github/workflows/build_examples.yaml b/.github/workflows/build_examples.yaml index 2689ce4..91366c4 100644 --- a/.github/workflows/build_examples.yaml +++ b/.github/workflows/build_examples.yaml @@ -16,9 +16,8 @@ jobs: examples/FileDownload, examples/MqttClient, examples/WebClient, - tools/AT_Debug, + tools/test_build, tools/Diagnostics, - tools/FactoryReset, ] modem: [ @@ -86,5 +85,6 @@ jobs: echo "${{ env.LIBRARY_INSTALL_SOURCE }}" pio lib --global install ${{ env.LIBRARY_INSTALL_SOURCE }} pio lib --global install 89 415 1202 1286 + sed -i 's/\/\/ #define TINY_GSM_MODEM_SIM800/#define TINY_GSM_MODEM_SIM800/' platformio ci --project-option='build_flags=-D ${{ env.TINYGSM_MODEM_TO_USE }}' --project-option='framework=arduino' --board=uno --board=leonardo --board=yun --board=megaatmega2560 --board=genuino101 --board=mkr1000USB --board=zero --board=teensy31 --board=bluepill_f103c8 --board=uno_pic32 --board=esp01 --board=nodemcuv2 --board=esp32dev pio lib --global uninstall TinyGSM diff --git a/examples/AllFunctions/AllFunctions.ino b/examples/AllFunctions/AllFunctions.ino index 7e6c6b5..7f1c3c5 100644 --- a/examples/AllFunctions/AllFunctions.ino +++ b/examples/AllFunctions/AllFunctions.ino @@ -35,11 +35,14 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -// #include -// SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif // See all AT commands, if wanted // #define DUMP_AT_COMMANDS diff --git a/examples/BlynkClient/BlynkClient.ino b/examples/BlynkClient/BlynkClient.ino index b12117d..542f98a 100644 --- a/examples/BlynkClient/BlynkClient.ino +++ b/examples/BlynkClient/BlynkClient.ino @@ -56,11 +56,14 @@ #define SerialMon Serial // Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif // Your GPRS credentials, if any diff --git a/examples/FileDownload/FileDownload.ino b/examples/FileDownload/FileDownload.ino index 1d75211..ef91417 100644 --- a/examples/FileDownload/FileDownload.ino +++ b/examples/FileDownload/FileDownload.ino @@ -39,11 +39,14 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif // Increase RX buffer to capture the entire response // Chips without internal buffering (A6/A7, ESP8266, M590) diff --git a/examples/HttpClient/HttpClient.ino b/examples/HttpClient/HttpClient.ino index 6c99985..4dbcb18 100644 --- a/examples/HttpClient/HttpClient.ino +++ b/examples/HttpClient/HttpClient.ino @@ -44,11 +44,14 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif // Increase RX buffer to capture the entire response // Chips without internal buffering (A6/A7, ESP8266, M590) diff --git a/examples/HttpsClient/HttpsClient.ino b/examples/HttpsClient/HttpsClient.ino index b5060da..ffe024a 100644 --- a/examples/HttpsClient/HttpsClient.ino +++ b/examples/HttpsClient/HttpsClient.ino @@ -37,11 +37,14 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif // Increase RX buffer to capture the entire response // Chips without internal buffering (A6/A7, ESP8266, M590) diff --git a/examples/MqttClient/MqttClient.ino b/examples/MqttClient/MqttClient.ino index f615cca..dbd6ce8 100644 --- a/examples/MqttClient/MqttClient.ino +++ b/examples/MqttClient/MqttClient.ino @@ -53,11 +53,15 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 +#endif // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif // See all AT commands, if wanted // #define DUMP_AT_COMMANDS diff --git a/examples/WebClient/WebClient.ino b/examples/WebClient/WebClient.ino index 73b808f..8f7f775 100644 --- a/examples/WebClient/WebClient.ino +++ b/examples/WebClient/WebClient.ino @@ -34,11 +34,14 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif // Increase RX buffer to capture the entire response // Chips without internal buffering (A6/A7, ESP8266, M590) diff --git a/tools/AT_Debug/AT_Debug.ino b/tools/AT_Debug/AT_Debug.ino index 76774f4..1514a7c 100644 --- a/tools/AT_Debug/AT_Debug.ino +++ b/tools/AT_Debug/AT_Debug.ino @@ -29,11 +29,14 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif #define TINY_GSM_DEBUG SerialMon diff --git a/tools/Diagnostics/Diagnostics.ino b/tools/Diagnostics/Diagnostics.ino index 0b553a8..1ddbe55 100644 --- a/tools/Diagnostics/Diagnostics.ino +++ b/tools/Diagnostics/Diagnostics.ino @@ -35,11 +35,14 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif // Increase RX buffer to capture the entire response // Chips without internal buffering (A6/A7, ESP8266, M590) diff --git a/tools/FactoryReset/FactoryReset.ino b/tools/FactoryReset/FactoryReset.ino index ebb59d4..545a247 100644 --- a/tools/FactoryReset/FactoryReset.ino +++ b/tools/FactoryReset/FactoryReset.ino @@ -32,11 +32,14 @@ // Set serial for AT commands (to the module) // Use Hardware Serial on Mega, Leonardo, Micro +#ifndef __AVR_ATmega328P__ #define SerialAT Serial1 // or Software Serial on Uno, Nano -//#include -//SoftwareSerial SerialAT(2, 3); // RX, TX +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif #include StreamDebugger debugger(SerialAT, SerialMon);