Another typo

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
Sara Damiano
2020-05-14 16:11:50 -04:00
parent cdd43eeb4d
commit 7ffb2f0a8e
2 changed files with 24 additions and 15 deletions

View File

@@ -178,7 +178,7 @@ If you have found TinyGSM to be useful in your work, research or company, please
4. Ensure that you have a stable power supply to the module of at least **2A**.
5. Check if serial connection is working (Hardware Serial is recommended)
Send an ```AT``` command using [this sketch](tools/AT_Debug/AT_Debug.ino)
6. Try out the [WebClient](https://github.com/vshymanskyy/TinyGSM/blob/master/examples/WebClient/WebClient.ino) example/
6. Try out the [WebClient](https://github.com/vshymanskyy/TinyGSM/blob/master/examples/WebClient/WebClient.ino) example
#### Writing your own code

View File

@@ -49,7 +49,7 @@
// Range to attempt to autobaud
#define GSM_AUTOBAUD_MIN 9600
#define GSM_AUTOBAUD_MAX 115200
#define GSM_AUTOBAUD_MAX 57600
/*
* Tests enabled
@@ -58,16 +58,16 @@
#define TINY_GSM_TEST_WIFI false
#define TINY_GSM_TEST_TCP true
#define TINY_GSM_TEST_SSL true
#define TINY_GSM_TEST_CALL true
#define TINY_GSM_TEST_SMS true
#define TINY_GSM_TEST_USSD true
// #define TINY_GSM_TEST_CALL true
// #define TINY_GSM_TEST_SMS true
// #define TINY_GSM_TEST_USSD true
#define TINY_GSM_TEST_BATTERY true
#define TINY_GSM_TEST_TEMPERATURE true
#define TINY_GSM_TEST_GSM_LOCATION true
#define TINY_GSM_TEST_TIME true
#define TINY_GSM_TEST_GPS true
#define TINY_GSM_TEST_GPS false
// powerdown modem after tests
#define TINY_GSM_POWERDOWN false
#define TINY_GSM_POWERDOWN true
// set GSM PIN, if any
#define GSM_PIN ""
@@ -78,6 +78,7 @@
// Your GPRS credentials, if any
const char apn[] = "YourAPN";
// const char apn[] = "ibasis.iot";
const char gprsUser[] = "";
const char gprsPass[] = "";
@@ -119,16 +120,25 @@ void setup() {
// !!!!!!!!!!!
// Set your reset, enable, power pins here
pinMode(23, OUTPUT);
digitalWrite(23, HIGH);
pinMode(A5, OUTPUT);
DBG("Pin HIGH");
digitalWrite(A5, HIGH);
delay(5000);
DBG("Pin LOW");
digitalWrite(A5, LOW);
delay(1300);
digitalWrite(A5, HIGH);
DBG("Pin HIGH");
// pinMode(20, OUTPUT);
// digitalWrite(20, HIGH);
// !!!!!!!!!!!
DBG("Wait...");
delay(6000);
// Set GSM module baud rate
TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX);
// SerialAT.begin(9600);
// TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX);
SerialAT.begin(9600);
}
void loop() {
@@ -138,7 +148,6 @@ void loop() {
if (!modem.restart()) {
// if (!modem.init()) {
DBG("Failed to restart modem, delaying 10s and retrying");
delay(10000L);
// restart autobaud in case GSM just rebooted
// TinyGsmAutoBaud(SerialAT, GSM_AUTOBAUD_MIN, GSM_AUTOBAUD_MAX);
return;