Skip to content

Commit

Permalink
Rename Serial var
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsb85 committed Jan 20, 2023
1 parent 8de478d commit dc3d87c
Show file tree
Hide file tree
Showing 20 changed files with 72 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -232,7 +232,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -241,7 +241,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -258,7 +258,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -234,7 +234,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
6 changes: 3 additions & 3 deletions examples/EG25-G_Example11_Clock/EG25-G_Example11_Clock.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -55,7 +55,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 9600) )
if (myEG25.begin(atSerial, 9600) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -92,7 +92,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -86,7 +86,7 @@ void setup()
myEG25.autoTimeZoneForBegin(false);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -99,7 +99,7 @@ void setup()
myEG25.autoTimeZoneForBegin(false);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -115,7 +115,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -119,7 +119,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 115200) )
if (myEG25.begin(atSerial, 115200) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@

#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);

// To create a SoftwareSerial object to pass to the EG25-G library instead
#ifdef EG25_G_SOFTWARE_SERIAL_ENABLED
SoftwareSerial atSerial(8, 9);
#else
// To connect to the EG25-G using hardware Serial1
#define atSerial Serial1
#endif
// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
// but we can start the EG25 without a power pin. It just means we need to manually
Expand Down Expand Up @@ -68,7 +69,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 9600) ) {
if (myEG25.begin(atSerial, 9600) ) {
Serial.println(F("EG25-G connected!"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -91,7 +91,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 9600) )
if (myEG25.begin(atSerial, 9600) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Create a SoftwareSerial object to pass to the EG25-G library
// Note: we need to call eg25Serial.begin and eg25Serial.end in setup() - see below for details
SoftwareSerial eg25Serial;
// Note: we need to call atSerial.begin and atSerial.end in setup() - see below for details
SoftwareSerial atSerial;

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -96,14 +96,14 @@ void setup()
myEG25.invertPowerPin(true);

// ESPSoftwareSerial does not like repeated .begin's without a .end in between.
// We need to .begin and .end the eg25Serial port here, before the myEG25.begin, to set up the pin numbers etc.
// We need to .begin and .end the atSerial port here, before the myEG25.begin, to set up the pin numbers etc.
// E.g. to use: 57600 baud; 8 databits, no parity, 1 stop bit; RXD on pin 33; TXD on pin 32; no inversion.
Serial.println(F("Configuring SoftwareSerial eg25Serial"));
eg25Serial.begin(57600, SWSERIAL_8N1, 33, 32, false);
eg25Serial.end();
Serial.println(F("Configuring SoftwareSerial atSerial"));
atSerial.begin(57600, SWSERIAL_8N1, 33, 32, false);
atSerial.end();

// Initialize the EG25
if (myEG25.begin(eg25Serial, 57600) )
if (myEG25.begin(atSerial, 57600) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -99,7 +99,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 9600) )
if (myEG25.begin(atSerial, 9600) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -170,7 +170,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 9600) )
if (myEG25.begin(atSerial, 9600) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down Expand Up @@ -282,12 +282,12 @@ void setup()
void loop()
{
// Loop provides a debugging interface.
if (eg25Serial.available()) {
Serial.write((char) eg25Serial.read());
if (atSerial.available()) {
Serial.write((char) atSerial.read());
}
#ifdef DEBUG_PASSTHROUGH_ENABLED
if (Serial.available()) {
eg25Serial.write((char) Serial.read());
atSerial.write((char) Serial.read());
}
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#include <FC0003390327.h> //Click here to get the library: http://librarymanager/All#Firechip_Quectel_EG25-G_Arduino_Library

// Uncomment the next line to connect to the EG25-G using hardware Serial1
#define eg25Serial Serial1
#define atSerial Serial1

// Uncomment the next line to create a SoftwareSerial object to pass to the EG25-G library instead
//SoftwareSerial eg25Serial(8, 9);
//SoftwareSerial atSerial(8, 9);

// Create a EG25_G object to use throughout the sketch
// Usually we would tell the library which GPIO pin to use to control the EG25 power (see below),
Expand Down Expand Up @@ -61,7 +61,7 @@ void setup()
myEG25.invertPowerPin(true);

// Initialize the EG25
if (myEG25.begin(eg25Serial, 9600) )
if (myEG25.begin(atSerial, 9600) )
{
Serial.println(F("EG25-G connected!"));
}
Expand Down
Loading

0 comments on commit dc3d87c

Please sign in to comment.