Browse Source

Fixed typos

v_master
Sara Damiano 6 years ago
parent
commit
4ea6f872e4
1 changed files with 12 additions and 10 deletions
  1. +12
    -10
      examples/AllFunctions/AllFunctions.ino

+ 12
- 10
examples/AllFunctions/AllFunctions.ino View File

@ -11,15 +11,19 @@
// Select your modem: // Select your modem:
#define TINY_GSM_MODEM_SIM800 #define TINY_GSM_MODEM_SIM800
// #define TINY_GSM_MODEM_SIM808
// #define TINY_GSM_MODEM_SIM900 // #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_SIM808
// #define TINY_GSM_MODEM_SIM868
// #define TINY_GSM_MODEM_UBLOX // #define TINY_GSM_MODEM_UBLOX
// #define TINY_GSM_MODEM_M95
// #define TINY_GSM_MODEM_BG96 // #define TINY_GSM_MODEM_BG96
// #define TINY_GSM_MODEM_A6 // #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7 // #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590 // #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_MC60 // #define TINY_GSM_MODEM_MC60
// #define TINY_GSM_MODEM_MC60E // #define TINY_GSM_MODEM_MC60E
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
// Set serial for debug console (to the Serial Monitor, speed 115200) // Set serial for debug console (to the Serial Monitor, speed 115200)
#define SerialMon Serial #define SerialMon Serial
@ -91,7 +95,7 @@ void loop() {
// To skip it, call init() instead of restart() // To skip it, call init() instead of restart()
DBG("Initializing modem..."); DBG("Initializing modem...");
if (!modem.restart()) { if (!modem.restart()) {
DBG("Failed to restart modem, delayin 10s and retring");
DBG("Failed to restart modem, delaying 10s and retrying");
delay(3000); delay(3000);
// restart autobaud in case GSM just rebooted // restart autobaud in case GSM just rebooted
TinyGsmAutoBaud(SerialAT,GSM_AUTOBAUD_MIN,GSM_AUTOBAUD_MAX); TinyGsmAutoBaud(SerialAT,GSM_AUTOBAUD_MIN,GSM_AUTOBAUD_MAX);
@ -103,7 +107,7 @@ void loop() {
DBG("Modem:", modemInfo); DBG("Modem:", modemInfo);
// Unlock your SIM card with a PIN if needed // Unlock your SIM card with a PIN if needed
if ( GSM_PIN && modem.getSimStatus() != 3 ) {
if ( GSM_PIN && modem.getSimStatus() != 3 ) {
modem.simUnlock(GSM_PIN); modem.simUnlock(GSM_PIN);
} }
@ -123,7 +127,6 @@ void loop() {
delay(10000); delay(10000);
return; return;
} }
#endif
bool res = modem.isGprsConnected(); bool res = modem.isGprsConnected();
DBG("GPRS status:", res ? "connected" : "not connected"); DBG("GPRS status:", res ? "connected" : "not connected");
@ -139,7 +142,6 @@ void loop() {
IPAddress local = modem.localIP(); IPAddress local = modem.localIP();
DBG("Local IP:", local); DBG("Local IP:", local);
#endif
int csq = modem.getSignalQuality(); int csq = modem.getSignalQuality();
DBG("Signal quality:", csq); DBG("Signal quality:", csq);
@ -157,10 +159,10 @@ void loop() {
DBG("GSM location:", gsmLoc); DBG("GSM location:", gsmLoc);
// This is only supported on SIMxxx series // This is only supported on SIMxxx series
String gsmTime = modem.getGSMDateTime(DATE_TIME);
DBG("GSM Time:", gsmTime);
String gsmDate = modem.getGSMDateTime(DATE_DATE);
DBG("GSM Date:", gsmDate);
// String gsmTime = modem.getGSMDateTime(DATE_TIME);
// DBG("GSM Time:", gsmTime);
// String gsmDate = modem.getGSMDateTime(DATE_DATE);
// DBG("GSM Date:", gsmDate);
String ussd_balance = modem.sendUSSD("*111#"); String ussd_balance = modem.sendUSSD("*111#");
DBG("Balance (USSD):", ussd_balance); DBG("Balance (USSD):", ussd_balance);
@ -219,7 +221,7 @@ void loop() {
} }
#endif #endif
#if TINY_GSM_POWERDOWN
#if TINY_GSM_POWERDOWN
// Try to power-off (modem may decide to restart automatically) // Try to power-off (modem may decide to restart automatically)
// To turn off modem completely, please use Reset/Enable pins // To turn off modem completely, please use Reset/Enable pins
modem.poweroff(); modem.poweroff();


Loading…
Cancel
Save