Better diagnostics

This commit is contained in:
Volodymyr Shymanskyy
2016-12-29 14:14:42 +02:00
parent 5a860fa00e
commit 6af63d6427
2 changed files with 42 additions and 20 deletions

View File

@@ -9,6 +9,14 @@
*
**************************************************************/
// Select your modem:
#define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
#include <TinyGsmClient.h>
#include <StreamDebugger.h>
// Set serial for debug console (to the Serial Monitor, speed 115200)
#define SerialMon Serial
@@ -20,8 +28,6 @@
//#include <SoftwareSerial.h>
//SoftwareSerial SerialAT(2, 3); // RX, TX
#include <TinyGsmClient.h>
#include <StreamDebugger.h>
StreamDebugger debugger(SerialAT, SerialMon);
TinyGsm modem(debugger);
@@ -36,7 +42,7 @@ void setup() {
if (!modem.init()) {
SerialMon.println(F("***********************************************************"));
SerialMon.println(F(" Cannot initialize module!"));
SerialMon.println(F(" Cannot initialize modem!"));
SerialMon.println(F(" Use File -> Examples -> TinyGSM -> tools -> AT_Debug"));
SerialMon.println(F(" to find correct configuration"));
SerialMon.println(F("***********************************************************"));