Arduino UNO with FONA800 shield
Suddenly stopped working and hangs on Blynk.begin(auth, modem, apn, user, pass);
Any help much appreciated. Thanks.
#define TINY_GSM_MODEM_SIM800
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>
#include <SoftwareSerial.h>
#include <Adafruit_Sensor.h>
#include <Rtc_Pcf8563.h>
#include <DHT_U.h>
#include <DHT.h>
#include "Constants.h"
#include "ClockAdapter.h"
#include "PowerManagement.h"
#include "SensorAdapter.h"
//SensorAdapter sensors;
//ClockAdapter clock;
//PowerManagement power;
#define BLYNK_PRINT Serial
#define TINY_GSM_MODEM_SIM800
char auth[] = "xxxxx";
char apn[] = "hologram";
char user[] = "";
char pass[] = "";
SoftwareSerial SerialAT(3, 2); // RX, TX For FONA 800!!!
TinyGsm modem(SerialAT);
BlynkTimer timer;
int activateDelay = 24;
void setup()
{
Serial.begin(9600);
Serial.println("Starting");
//shutdown();
// sensors.init();
// power.init();
// clock.init();
// power.activateFona();
// Set GSM module baud rate
SerialAT.begin(9600);
delay(3000);
// Restart takes quite some time
// To skip it, call init() instead of restart()
Serial.println("Initializing modem...");
modem.restart();
Serial.println("a");
int bat = modem.getBattPercent();
Serial.print("Battery ");
Serial.println(bat);
Serial.println("aa");
Blynk.begin(auth, modem, apn, user, pass);
Serial.println("b");
=== OUTPUT ===
Port open
Starting
Initializing modem...
a
Battery 55
aa