Fix tools
This commit is contained in:
@@ -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() {
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user