Hi I've been using the IOT for a number of weeks now and suddenly I can no longer connect as I get the error message. no code has changed.
Im using the web editor, i the error seems before it hits my code but unsure. using a nano 33t board.
I tried removing and re installing the board and properties but no change
Be gentle with me i'm new at this!!! useful help is good, superior criticism ... not so!
Thanks
//
WiFiNINA - Version: Latest
#include <WiFiNINA.h>
// Arduino_ConnectionHandler - Version: Latest
#include "thingProperties.h"
#include "Arduino.h"
#include "Servo.h"
// Pin Definitions
#define SERVO9G_PIN_SIG 2
const int restPos = 100; //Starting position
const int outPos =20;
const int inPos = 180;
// object initialization
Servo servo9g;
void setup() {
Serial.begin(9600);
while (!Serial) ; // wait for serial port to connect. Needed for native USB
Serial.println("start");
servo9g.write(90);
servo9g.attach(SERVO9G_PIN_SIG);
delay(100);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(4);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
//Error seems to be at this point???
delay(1000);
}
void onAwningChange() {
static bool out;
static bool firstTime;
static int iCount;
Serial.print("changing");
if (firstTime !=true) {
firstTime = true;
goto firsttimeexit;
}
switch (out) {
case true:
iCount = inPos;
out=false;
break;
case false:
iCount = outPos;
out=true;
break;
}
Serial.print(" iCount=" + String(iCount));
servo9g.write(iCount);
delay(2000);
servo9g.write(restPos);
firsttimeexit:
firstTime = true;
Serial.print ("Exit loop3= " + String(firstTime));
}
start
***** Arduino IoT Cloud - configuration info *****
Device ID: c9b12fa7-5d0c-42d2-8210-XXXXXXXXX
Thing ID: c4b7b8d5-afbf-4d93-874d-XXXXXXXXXX
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 1.2.3
Connection to "xxxxxxx failed
Retrying in "500" milliseconds
Connected to "VM8191823"
Arduino IoT Cloud Connection status: CONNECTING
ArduinoCloud.connect(): 0
ArduinoCloud.connect():
Please assist