Very newbie: Cannot connect to WiFi

I am very new to Arduino. I am trying the 2nd project in on-line tutorial one gets when registering IoT kit. Project is called "Graphing Data in the Cloud".
My sketch compiles ok, and it loads ok. The display on MKR IoT Carrier first seems to indicate it found the WiFi SSID, but then continues to say "Waiting for Connection....
I have entered the SSID and Password for my WiFi network into the SECRET tab on the on-line editor: Arduino Cloud. I have reviewed many of the postings that seem to be related to this problem, but have not found the solution (but i'll continue to read more of them).

Hardware:
MKR WIFI 1010 with MKR IoT Carrier; laptop running Google Chrome

Here are error messages from Monitor:
Connection to "SummerPlaceGoogle" failed
Retrying in "500" milliseconds
Connection to "SummerPlaceGoogle" failed
Retrying in "500" milliseconds
Connection to "SummerPlaceGoogle" failed
Retrying in "500" milliseconds
Connection to "SummerPlaceGoogle" failed
Retrying in "500" milliseconds
Connected to "SummerPlaceGoogle"
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to mqtts-sa.iot.arduino.cc:8883
ArduinoIoTCloudTCP::handle_ConnectMqttBroker 1 connection attempt at tick time 42418
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to mqtts-sa.iot.arduino.cc:8883
ArduinoIoTCloudTCP::handle_ConnectMqttBroker 2 connection attempt at tick time 57537

Here is the sketch, (I have tried to use the code formatting, but not sure if i have that right.)

// BSEC Software Library - Version: 1.6.1480
#include <bsec.h>

/* Sketch generated by the Arduino IoT Cloud Thing "Untitled 2"
https://create.arduino.cc/cloud/things/4f977c30-c624-4b8c-8af6-6905f899ce7e
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing

float humidity;
float temperature;

Variables 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 <Arduino_MKRIoTCarrier.h>
MKRIoTCarrier carrier;

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);

CARRIER_CASE = false;
carrier.begin();

/*
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 4
*/
setDebugMessageLevel(4);
ArduinoCloud.printDebugInfo();

//Wait to get cloud connection to init the carrier

while (ArduinoCloud.connected() != 1) {
ArduinoCloud.update();
carrier.display.setTextSize(3);
carrier.display.setCursor(20, 70);
carrier.display.println("Waiting For");
carrier.display.setCursor(5, 110);
carrier.display.println("Connection...");
delay(500);
}
}

void loop() {
ArduinoCloud.update();
// Your code here
carrier.Env.readTemperature();
carrier.Env.readHumidity();

temperature = carrier.Env.readTemperature();
humidity = carrier.Env.readHumidity();

Serial.print(temperature);
Serial.print(",");
Serial.println(humidity);

delay(1000);
}

And here is code autogenerated by Arduino IoT Cloud

// Code generated by Arduino IoT Cloud, DO NOT EDIT.

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

const char SSID[]     = SECRET_SSID;    // Network SSID (name)
const char PASS[]     = SECRET_OPTIONAL_PASS;    // Network password (use for WPA, or use as key for WEP)


float humidity;
float temperature;

void initProperties(){

  ArduinoCloud.addProperty(humidity, READ, 1 * SECONDS, NULL);
  ArduinoCloud.addProperty(temperature, READ, 1 * SECONDS, NULL);

}

WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);

I have moved this post to what i now understand to be a more proper Category. So i've committed to faults so far: posting in the wrong category and then posting a 2nd time. But I think I AM learning, so i get some props for that. I have tried to follow the instructions for using Preformatted text for code.

I am very new to Arduino. I am trying the 2nd project in on-line tutorial one gets when registering IoT kit. Project is called "Graphing Data in the Cloud".
My sketch compiles ok, and it loads ok. The display on MKR IoT Carrier first seems to indicate it found the WiFi SSID, but then continues to say "Waiting for Connection....
I have entered the SSID and Password for my WiFi network into the SECRET tab on the on-line editor: Arduino Cloud. I have reviewed many of the postings that seem to be related to this problem, but have not found the solution (but i'll continue to read more of them).

Hardware:
MKR WIFI 1010 with MKR IoT Carrier; laptop running Google Chrome

Here are error messages from Monitor:
Connection to "SummerPlaceGoogle" failed
Retrying in "500" milliseconds
Connection to "SummerPlaceGoogle" failed
Retrying in "500" milliseconds
Connection to "SummerPlaceGoogle" failed
Retrying in "500" milliseconds
Connection to "SummerPlaceGoogle" failed
Retrying in "500" milliseconds
Connected to "SummerPlaceGoogle"
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to mqtts-sa.iot.arduino.cc:8883
ArduinoIoTCloudTCP::handle_ConnectMqttBroker 1 connection attempt at tick time 42418
ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to mqtts-sa.iot.arduino.cc:8883
ArduinoIoTCloudTCP::handle_ConnectMqttBroker 2 connection attempt at tick time 57537

Here is the sketch, (I have tried to use the code formatting, but not sure if i have that right.)

// BSEC Software Library - Version: 1.6.1480
#include <bsec.h>


/* Sketch generated by the Arduino IoT Cloud Thing "Untitled 2"
https://create.arduino.cc/cloud/things/4f977c30-c624-4b8c-8af6-6905f899ce7e
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing

float humidity;
float temperature;

Variables 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 <Arduino_MKRIoTCarrier.h>
MKRIoTCarrier carrier;

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);

CARRIER_CASE = false;
carrier.begin();

/*
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 4
*/
setDebugMessageLevel(4);
ArduinoCloud.printDebugInfo();

//Wait to get cloud connection to init the carrier

while (ArduinoCloud.connected() != 1) {
ArduinoCloud.update();
carrier.display.setTextSize(3);
carrier.display.setCursor(20, 70);
carrier.display.println("Waiting For");
carrier.display.setCursor(5, 110);
carrier.display.println("Connection...");
delay(500);
}
}

void loop() {
ArduinoCloud.update();
// Your code here
carrier.Env.readTemperature();
carrier.Env.readHumidity();

temperature = carrier.Env.readTemperature();
humidity = carrier.Env.readHumidity();

Serial.print(temperature);
Serial.print(",");
Serial.println(humidity);

delay(1000);
}

And here is code autogenerated by Arduino IoT Cloud

// Code generated by Arduino IoT Cloud, DO NOT EDIT.

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

const char SSID[]     = SECRET_SSID;    // Network SSID (name)
const char PASS[]     = SECRET_OPTIONAL_PASS;    // Network password (use for WPA, or use as key for WEP)


float humidity;
float temperature;

void initProperties(){

  ArduinoCloud.addProperty(humidity, READ, 1 * SECONDS, NULL);
  ArduinoCloud.addProperty(temperature, READ, 1 * SECONDS, NULL);

}

WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);

Your two or more topics on the same or similar subject have been merged.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you also take a few moments to Learn How To Use The Forum.

It will help you get the best out of the forum in the future.

  • Your OS and version can be valuable information, please include it along with extra security you are using.

  • Always list the version of the IDE you are using and the board version if applicable.

  • Use quote or add error messages as an attachment NOT a picture.

  • How to insert an image into your post. ( Thanks @sterretje )

  • Add your sketch where applicable but please use CODE TAGS ( </> )

  • Add a SCHEMATIC were needed even if it is hand drawn

  • Add working links to any specific hardware as needed (NOT links to similar items)

  • Remember that the people trying to help cannot see your problem so give as much information as you can

COMMON ISSUES

  • Ensure you have FULLY inserted the USB cables.

  • Check you have a COMMON GROUND where required. ( Thanks @Perry)

  • Where possible use USB 2.0 ports or a USB 2.0 POWERED HUB to rule out USB 3.0 issues.

  • Try other computers where possible.

  • Try other USB leads where possible.

  • You may not have the correct driver installed. CH340/341 or CP2102 or FT232 VCP Drivers - FTDI

  • There may be a problem with the board check or remove your wiring first.

  • Remove any items connected to pins 0 and 1.

COMPUTER RELATED

  • Close any other serial programs before opening the IDE.

  • Ensure you turn off any additional security / antivirus just to test.

  • There may be a problem with the PC try RESTARTING it.

  • You may be selecting the wrong COM port.

  • Avoid cloud/network based installations where possible OR ensure your Network/Cloud software is RUNNING.

  • Clear your browsers CACHE.

  • Close the IDE before using any other serial programs.

  • Preferably install IDE’s as ADMINISTRATOR or your OS equivalent

ARDUINO SPECIFIC BOARDS

  • CH340/341 based clones do not report useful information to the “get board info” button.

  • NANO (Old Types) some require you to use the OLD BOOTLOADER option.

  • NANO (ALL Types) See the specific sections lower in the forum.

  • NANO (NEW Types) Install your board CORE’s.

  • Unless using EXTERNAL PROGRAMMERS please leave the IDE selection at default “AVRISP mkII”.

  • Boards using a MICRO usb connector need a cable that is both DATA and CHARGE. Many are CHARGE ONLY.

CREATE editor install locations.

  • On macOs ~/Applications/ArduinoCreateAgent-1.1/ArduinoCreateAgent.app/Contents/MacOS/config.ini

  • On Linux ~/ArduinoCreateAgent-1.1/config.ini

  • On Windows C:\Users[your user]\AppData\Roaming\ArduinoCreateAgent-1.1

Performing the above actions may help resolve your problem without further help.

Language problem ?

Try a language closer to your native language:

Thanks to all those who helped and added to this list.

Thank you for our guidance. I should have posted in Software, only, in the first place.

Can you please help me further with proper posting of code. I had copied and pasted code into forum, highlighted it, and then click the </> tool. Is that the correct process? Thank you.

That will work too.

If you are using the Arduino IDE you can also select the "Copy for Forum" found in the "EDIT" menu.
Then you can paste it in here.

Thank you for that help. Next question: both you and another helpful soul replied to my original posting. Should I reply back to both of you? The other poster asked for clarification of my question.
(I truly appreciate your help here as I'm somewhat elderly, and I've never posted to a forum of any type before.)

Am only a moderator and my coding skills are best described as "hack and slash"
Also been retired for a while.
People will pop in as and when or if the topic interests them.
The users here are from around the globe so don't rely on quick answers as some may be asleep :zzz:

We're probably about the same age, but we won't discuss. Thanks again for all your help.

  1. Please explain what I have not done correctly regarding doc formatting. I copied code, pasted, highlighted, and click the </> tool. I am brand new to this (and any) forum, so I am wide open to learning.
  2. The question is: Why am I not able to connect to my Wi-Fi?

Thank you for your patience as I learn the forum protocols. (Even the beginner instructions can be a bit difficult given I’ve never done this before.)