Errors with Arduino 1010 IOT

The following errors occur on a IOT program that and turned on and off LED from Dashboard. I attached the code following error.

ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to
ArduinoIoTCloudTCP::handle_ConnectMqttBroker 4 connection attempt at tick time 42816
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to
ArduinoIoTCloudTCP::handle_ConnectMqttBroker 5 connection attempt at tick time 75926

Check your thing configuration, and press the reset button on your board.
ArduinoIoTCloudTCP::handle_SubscribeMqttTopics could not subscribe to


Arduino IoT Cloud Properties description

The following variables are automatically generated and updated when changes are made to the Thing properties
LED work IOT

bool switchState;
int potentiometerValue;
bool ledState;

Properties which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.

#include "thingProperties.h"
/* #include <FTDebouncer.h> */

#define LED_PIN 2
#define POT_PIN A1
#define BUTTON_PIN 5

/* FTDebouncer buttons; */

void setup() {

/* buttons.addPin(BUTTON_PIN, LOW); /
buttons.init(); */

The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 3

// Initialize serial and wait for port to open:
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found

/* */

// Defined in thingProperties.h

// Connect to Arduino IoT Cloud

void loop() {



void onLightChange() {
digitalWrite(LED_PIN, light);
Serial.print("The light is ");
if (light) {
} else {
Serial.println("Light is OFF");


#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>

char ssid = SECRET_SSID; // Network SSID (name)
char pass = SECRET_PASS; // Network password (use for WPA, or use as key for WEP)

#define THING_ID "a45aead5-4550-4288-b662-61c55dfaef63"

void onLightChange();

bool light;

void initProperties(){

ArduinoCloud.addProperty(light, READWRITE, ON_CHANGE, onLightChange);


WiFiConnectionHandler ArduinoIoTPreferredConnection(ssid, pass);

Read the forum guidelines to see how to properly post code and information on how to get the most from this forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.