Fix tools

This commit is contained in:
Volodymyr Shymanskyy
2016-12-02 17:00:13 +02:00
parent fb3ffdb895
commit 34f43adc96
2 changed files with 19 additions and 5 deletions

View File

@@ -16,8 +16,15 @@ char apn[] = "YourAPN";
char user[] = ""; char user[] = "";
char pass[] = ""; char pass[] = "";
StreamDebugger GsmSerial(Serial1, Serial); // Use Hardware Serial on Mega, Leonardo, Micro
GsmClient gsm(GsmSerial); #define GsmSerial Serial1
// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial GsmSerial(2, 3); // RX, TX
StreamDebugger DebugSerial(GsmSerial, Serial);
TinyGsmClient gsm(DebugSerial);
void setup() { void setup() {
// Set console baud rate // Set console baud rate
@@ -31,7 +38,7 @@ void setup() {
gsm.networkConnect(apn, user, pass); gsm.networkConnect(apn, user, pass);
// Access AT commands from Serial // Access AT commands from Serial
GsmSerial.directAccess(); DebugSerial.directAccess();
} }
void loop() { void loop() {

View File

@@ -12,8 +12,15 @@
#include <TinyGsmClient.h> #include <TinyGsmClient.h>
#include <StreamDebugger.h> #include <StreamDebugger.h>
StreamDebugger GsmSerial(Serial1, Serial); // Use Hardware Serial on Mega, Leonardo, Micro
GsmClient gsm(GsmSerial); #define GsmSerial Serial1
// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial GsmSerial(2, 3); // RX, TX
StreamDebugger DebugSerial(GsmSerial, Serial);
TinyGsmClient gsm(DebugSerial);
void setup() { void setup() {
// Set console baud rate // Set console baud rate