Please find attached my error output and the sketch below.
I cant seem to establishe a connection after the line
"Blynk.begin(auth, nbAccess, gprs, client, pin)"
I'm using an irish vodafone sim on the MKR NB 1500 board.
Any help i can get with this would really be appreciated.
#define BLYNK_PRINT Serial // From blynk library for app communication
#include <BlynkSimpleMKRNB.h> // From blynk library for app communication
#include <MKRNB.h> // Contains all the NB connection functionalities
#include <Arduino_MKRENV.h> // Allows us to read values measured by all its sensors
// Defines variables
char auth[] = "OSa6bdOTgcrBMEOpaTOGm-FEsJM7K4hX"; // Required to pair the sketch with my project on Blynk
char pin[] = ""; // SIM credential
// These three lines initialize the objects that will be used to communicate with the data network
NBClient client;
GPRS gprs;
NB nbAccess;
// the setup routine runs once when you press reset:
void setup() {
//Blynk.begin(auth, nbAccess, gprs, client , pin);
Serial.begin(9600);
while (!Serial);
//Blynk.begin(auth, nbAccess, gprs, client , pin);
if (!ENV.begin()) {
Serial.println("Failed to initialize MKR ENV shield!");
while (1);
}
Blynk.begin(auth, nbAccess, gprs, client, pin);
}
// the loop routine runs over and over again forever:
void loop() {
// read all the sensor values
float temperature = ENV.readTemperature();
float humidity = ENV.readHumidity();
float pressure = ENV.readPressure();
float illuminance = ENV.readIlluminance();
float uva = ENV.readUVA();
float uvb = ENV.readUVB();
float uvIndex = ENV.readUVIndex();
// print each of the sensor values
Serial.print("Temperature = ");
Serial.print(temperature);
Serial.println(" °C");
Blynk.virtualWrite(V1, temperature);
Serial.print("Humidity = ");
Serial.print(humidity);
Serial.println(" %");
Serial.print("Pressure = ");
Serial.print(pressure);
Serial.println(" kPa");
Serial.print("Illuminance = ");
Serial.print(illuminance);
Serial.println(" lx");
Serial.print("UVA = ");
Serial.println(uva);
Serial.print("UVB = ");
Serial.println(uvb);
Serial.print("UV Index = ");
Serial.println(uvIndex);
// print an empty line
Serial.println();
// wait 30 seconds to print again (1000 == 1sec)
delay(30000);
}