IoT - Device is offline when I disconnect the USB

Hi,
I have setup a Arduino UNO R4 wifi device and have preliminary code that is already uploaded successfully.

The device shows up in editor, with its com port number. However, under Associated Device, it is listed as offline whether the board is connected by USB or not. When I disconnect the board, and leave it powered through a 9V battery, it shows as offline.

I have run through the trouble shooting guide here
If your device can't be added or won't connect to IoT Cloud – Arduino Help Center
and it hasn't helped. Arduino Create is running. The device setup ran without a hitch, and internet connections details have been input.

I found this guide but I don't know if its appropriate.
UNO R4 Wifi is not recognized or wrong recognized - UNO R4 / UNO R4 WiFi - Arduino Forum

I would appreciate any help in sorting this out.

Thanks

Does your code include something like while (!Serial) ?

1 Like

No.

I used the default template that loads with first sketch. So it has:


#include "thingProperties.h"

// Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);

void loop() {
  ArduinoCloud.update();

My program receives sensor data and modifies it.
I want to bring be able to bring these variables into a graph on the dashboard and track them.

Can you see if the dashboard is updated even though the board appears offline?

There have never been any updates or any sign the program is working.

Also to clarify on earlier description:
The device shows up in editor, with its com port number. However, under Associated Device, it is listed as offline whether the board is connected by USB or not. When I disconnect the board, and leave it powered through a 9V battery, it shows as offline.

Can you make sure that the Networks section of setup is properly done and after sketch upload check the Serial monitor to see when the board is connected successfully to cloud. It will take some time to make a connection. If you are getting any error on the serial monitor please share it here.