After Upload "Board at COM5 is not available"

Trying to turn the onboard LED on my Nano 33 IoT on and off with Blynk just as a starting point since Iā€™m clueless. I upload this code and the board loses connection.


/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "qRtWUKwQL5zIiiyIzLCGP2O0syyBvOap";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Dont Blink 182";
char pass[] = "Starkey1";

void setup()
  // Debug console

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);

void loop()

What is it that you are doing to trigger this message?


I figured it out. It was happening when I would upload the code. It would restart the board after the upload but not reconnect. I had the wrong board set in the Arduino IDE