I've had a fairly complex project working really well on the iot cloud platform for the last couple years, but for some reason every attempt at updating my code causes the board to crash immediately.
I've started completely from scratch for a sanity check, even bought a new Nano IoT 33, ran through the setup process and wrote a simple sketch that's barely a couple lines more than the auto-generated code. It works reliably when I flash the code via the online Editor, but when I download the project (.../"Download Sketch"), and flash on the local IDE on my machine, here's all that happens:
- the board appears to never get online
- the board reboots about ever 15 seconds
- The Serial Monitor only shows the following:
***** Arduino IoT Cloud - configuration info *****
Device ID: d7f4ecb0-c267-492d-aaa4-a324895dadd2
Thing ID:
MQTT Broker: mqtts-sa.iot.arduino.cc:8883
WiFi.status(): 0
Current WiFi Firmware: 1.4.8
I've confirmed my libraries are updated (Arduino_ConnectionHandler is V0.6.6, ArduinoIoTCloud is V1.6.0), and the board manager's version is update (V1.8.13).
I really don't want to be stuck with using the online IDE because I would prefer that the code be portable and shareable.
.ino file code attached here:
#include "thingProperties.h"
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(4);
_flowmeter = 0;
ArduinoCloud.printDebugInfo();
}
void loop() {
_flowmeter++;
ArduinoCloud.update();
}