From 34f43adc9604f958efbe8d85d08f378d25d8c722 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Fri, 2 Dec 2016 17:00:13 +0200 Subject: [PATCH] Fix tools --- tools/AT_Debug/AT_Debug.ino | 13 ++++++++++--- tools/FactoryReset/FactoryReset.ino | 11 +++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/tools/AT_Debug/AT_Debug.ino b/tools/AT_Debug/AT_Debug.ino index 69fc4b1..2136807 100644 --- a/tools/AT_Debug/AT_Debug.ino +++ b/tools/AT_Debug/AT_Debug.ino @@ -16,8 +16,15 @@ char apn[] = "YourAPN"; char user[] = ""; char pass[] = ""; -StreamDebugger GsmSerial(Serial1, Serial); -GsmClient gsm(GsmSerial); +// Use Hardware Serial on Mega, Leonardo, Micro +#define GsmSerial Serial1 + +// or Software Serial on Uno, Nano +//#include +//SoftwareSerial GsmSerial(2, 3); // RX, TX + +StreamDebugger DebugSerial(GsmSerial, Serial); +TinyGsmClient gsm(DebugSerial); void setup() { // Set console baud rate @@ -31,7 +38,7 @@ void setup() { gsm.networkConnect(apn, user, pass); // Access AT commands from Serial - GsmSerial.directAccess(); + DebugSerial.directAccess(); } void loop() { diff --git a/tools/FactoryReset/FactoryReset.ino b/tools/FactoryReset/FactoryReset.ino index 2f0e9ec..f32af52 100644 --- a/tools/FactoryReset/FactoryReset.ino +++ b/tools/FactoryReset/FactoryReset.ino @@ -12,8 +12,15 @@ #include #include -StreamDebugger GsmSerial(Serial1, Serial); -GsmClient gsm(GsmSerial); +// Use Hardware Serial on Mega, Leonardo, Micro +#define GsmSerial Serial1 + +// or Software Serial on Uno, Nano +//#include +//SoftwareSerial GsmSerial(2, 3); // RX, TX + +StreamDebugger DebugSerial(GsmSerial, Serial); +TinyGsmClient gsm(DebugSerial); void setup() { // Set console baud rate