Update API and examples
This commit is contained in:
		| @@ -42,13 +42,14 @@ char user[] = ""; | ||||
| char pass[] = ""; | ||||
|  | ||||
| // Hardware Serial on Mega, Leonardo, Micro | ||||
| #define GsmSerial Serial1 | ||||
| #define SerialAT Serial1 | ||||
|  | ||||
| // or Software Serial on Uno, Nano | ||||
| //#include <SoftwareSerial.h> | ||||
| //SoftwareSerial GsmSerial(2, 3); // RX, TX | ||||
| //SoftwareSerial SerialAT(2, 3); // RX, TX | ||||
|  | ||||
| TinyGsmClient gsm(GsmSerial); | ||||
| TinyGsm modem(SerialAT); | ||||
| TinyGsmClient client(modem); | ||||
|  | ||||
| void setup() | ||||
| { | ||||
| @@ -57,15 +58,14 @@ void setup() | ||||
|   delay(10); | ||||
|  | ||||
|   // Set GSM module baud rate | ||||
|   GsmSerial.begin(115200); | ||||
|   SerialAT.begin(115200); | ||||
|   delay(3000); | ||||
|  | ||||
|   // Restart takes quite some time | ||||
|   // You can skip it in many cases | ||||
|   Serial.println("Restarting modem..."); | ||||
|   gsm.restart(); | ||||
|   modem.restart(); | ||||
|  | ||||
|   Blynk.begin(auth, gsm, apn, user, pass); | ||||
|   Blynk.begin(auth, modem, apn, user, pass); | ||||
| } | ||||
|  | ||||
| void loop() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user