Browse Source

Added all possible modems to examples

v_master
SRGDamia1 7 years ago
parent
commit
d71928f6c2
7 changed files with 43 additions and 26 deletions
  1. +6
    -4
      examples/BlynkClient/BlynkClient.ino
  2. +7
    -5
      examples/FileDownload/FileDownload.ino
  3. +6
    -4
      examples/MqttClient/MqttClient.ino
  4. +6
    -4
      examples/WebClient/WebClient.ino
  5. +6
    -3
      tools/AT_Debug/AT_Debug.ino
  6. +6
    -4
      tools/Diagnostics/Diagnostics.ino
  7. +6
    -2
      tools/FactoryReset/FactoryReset.ino

+ 6
- 4
examples/BlynkClient/BlynkClient.ino View File

@ -30,9 +30,12 @@
// Select your modem: // Select your modem:
#define TINY_GSM_MODEM_SIM800 #define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
#include <TinyGsmClient.h> #include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h> #include <BlynkSimpleSIM800.h>
@ -81,4 +84,3 @@ void loop()
{ {
Blynk.run(); Blynk.run();
} }

+ 7
- 5
examples/FileDownload/FileDownload.ino View File

@ -14,9 +14,12 @@
// Select your modem: // Select your modem:
#define TINY_GSM_MODEM_SIM800 #define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
// Increase RX buffer // Increase RX buffer
#define TINY_GSM_RX_BUFFER 1030 #define TINY_GSM_RX_BUFFER 1030
@ -126,7 +129,7 @@ void loop() {
//Serial.println(line); // Uncomment this to show response header //Serial.println(line); // Uncomment this to show response header
line.toLowerCase(); line.toLowerCase();
if (line.startsWith("content-length:")) { if (line.startsWith("content-length:")) {
contentLength = line.substring(line.lastIndexOf(':') + 1).toInt();
contentLength = line.substring(line.lastIndexOf(':') + 1).toInt();
} else if (line.length() == 0) { } else if (line.length() == 0) {
break; break;
} }
@ -175,4 +178,3 @@ void loop() {
delay(1000); delay(1000);
} }
} }

+ 6
- 4
examples/MqttClient/MqttClient.ino View File

@ -27,9 +27,12 @@
// Select your modem: // Select your modem:
#define TINY_GSM_MODEM_SIM800 #define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
#include <TinyGsmClient.h> #include <TinyGsmClient.h>
#include <PubSubClient.h> #include <PubSubClient.h>
@ -145,4 +148,3 @@ void mqttCallback(char* topic, byte* payload, unsigned int len) {
mqtt.publish(topicLedStatus, ledStatus ? "1" : "0"); mqtt.publish(topicLedStatus, ledStatus ? "1" : "0");
} }
} }

+ 6
- 4
examples/WebClient/WebClient.ino View File

@ -10,9 +10,12 @@
// Select your modem: // Select your modem:
#define TINY_GSM_MODEM_SIM800 #define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
#include <TinyGsmClient.h> #include <TinyGsmClient.h>
@ -109,4 +112,3 @@ void loop() {
delay(1000); delay(1000);
} }
} }

+ 6
- 3
tools/AT_Debug/AT_Debug.ino View File

@ -10,8 +10,12 @@
// Select your modem: // Select your modem:
#define TINY_GSM_MODEM_SIM800 #define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
#include <TinyGsmClient.h> #include <TinyGsmClient.h>
@ -86,4 +90,3 @@ void loop() {
delay(0); delay(0);
} }
} }

+ 6
- 4
tools/Diagnostics/Diagnostics.ino View File

@ -11,9 +11,12 @@
// Select your modem: // Select your modem:
#define TINY_GSM_MODEM_SIM800 #define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
// Increase buffer fo see less commands // Increase buffer fo see less commands
#define TINY_GSM_RX_BUFFER 256 #define TINY_GSM_RX_BUFFER 256
@ -151,4 +154,3 @@ void loop() {
delay(1000); delay(1000);
} }
} }

+ 6
- 2
tools/FactoryReset/FactoryReset.ino View File

@ -11,8 +11,12 @@
// Select your modem: // Select your modem:
#define TINY_GSM_MODEM_SIM800 #define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266
// #define TINY_GSM_MODEM_XBEE
#include <TinyGsmClient.h> #include <TinyGsmClient.h>
#include <StreamDebugger.h> #include <StreamDebugger.h>


Loading…
Cancel
Save