#define CAYENNE_DEBUG #define CAYENNE_PRINT Serial #define TINY_GSM_DEBUG Serial #define TINY_GSM_MODEM_BG96 #include <CayenneMQTTGSM.h> #include <SoftwareSerial.h>
SoftwareSerial gsmSerial(10, 11); // RX, TX
// #define gsmSerial Serial1
// GSM connection info.
char apn = “soracom.io”;
char gprsLogin = “sora”;
char gprsPassword = “sora”;
char pin = “”; // SIM pin number. Leave empty if it is not needed.
// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username = " ";
char password = " ";
char clientID = " ";
void setup() {
Serial.begin(9600);
// Auto-detect the GSM serial baud rate. You can manually set it instead if you want to save a bit of space.
TinyGsmAutoBaud(gsmSerial);
Cayenne.begin(username, password, clientID, gsmSerial, apn, gprsLogin, gprsPassword, pin);
}