ΠΠΎΠ±ΡΡΠΉ Π΄Π΅Π½Ρ. ΠΡΠΎΡΡ ΠΏΠΎΠΌΠΎΡΠΈ.
ΠΈΠΌΠ΅Ρ Π»Π΅ΠΎΠ½Π°ΡΠ΄ΠΎ + a7. ΠΡΠΎΡΠΈΠ²Π°Ρ Π² ΠΈΡΠΎΠ³Π΅ ΠΈΠΌΠ΅Ρ ΡΠ°ΠΊΠΎΠΉ Π²ΡΠ²ΠΎΠ΄:
[13230]
01:14:08.583 -> ___ __ __
01:14:08.583 -> / _ )/ /_ _____ / /__
01:14:08.583 -> / _ / / // / _ \/ '_/
01:14:08.583 -> /____/_/\_, /_//_/_/\_\
01:14:08.583 -> /___/ v1.0.1 on Arduino Leonardo
01:14:08.583 ->
01:14:08.583 -> [13234] Modem init...
01:14:09.365 -> [14004] Connecting to network...
01:14:12.759 -> [17408] Network: MegaFon
01:14:12.759 -> [17408] Connecting to internet ...
01:14:19.425 -> [24058] Connected to GPRS
01:14:19.528 -> [24178] Connecting to blynk.cloud:80
01:14:24.521 -> [29177] Connecting to blynk.cloud:80
01:14:31.809 -> [36435] Connecting to blynk.cloud:80
Π§ΡΠΎ Ρ Π΄Π΅Π»Π°Ρ Π½Π΅ ΡΠ°ΠΊ? ΠΈ ΠΏΠΎΡΡ ΠΌΠ΅Π½ΡΠ» ΠΈ Π°Π΄ΡΠ΅Ρ ΠΏΠΈΠ½Π³ΠΎΠ²Π°Π» ΠΈ ΡΠΈΠΌΠΊΡ Π² ΡΠ΅Π»Π΅ΡΠΎΠ½ Π²ΡΡΠ°Π²Π»ΡΠ»β¦
ΠΠΎΠΌΠΎΠ³ΠΈΡΠ΅, ΠΌΡΠΆΠΈΠΊΠΈ
#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "TMPLINl46Otp"
#define BLYNK_DEVICE_NAME "leonardo gsm"
#define BLYNK_AUTH_TOKEN "ph------------------------o4b__"
#define TINY_GSM_MODEM_A7
#include <TinyGsmClient.h>
#include <BlynkSimpleTinyGSM.h>
char auth[] = "ph===================Jo4b__";
// Your GPRS credentials
// Leave empty, if missing user or pass
char apn[] = "internet";
char user[] = "";
char pass[] = "";
// Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial1
// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial SerialAT(2, 3); // RX, TX
TinyGsm modem(SerialAT);
void setup()
{
// Debug console
Serial.begin(9600);
delay(10);
// Set GSM module baud rate
SerialAT.begin(115200);
delay(3000);
// Restart takes quite some time
// To skip it, call init() instead of restart()
Serial.println("Initializing modem...");
modem.restart();
// Unlock your SIM card with a PIN
//modem.simUnlock("1234");
Blynk.begin(auth, modem, apn, user, pass);
}
void loop()
{
Blynk.run();
}