Arduino MKR WIF 1010 Resetting

I am trying to get Blynk running on an Arduino MKR WIFI 1010. I used the example code from the Blynk website. The code uploads fine but when it runs the Arduino will disconnect from the computer as if I am unplugging and plugging the device back in. This happens every 10 seconds or so. If I comment out the Blynk.begin in the setup loop then the problem goes away. I also tried keeping the Blynk.begin in but added in a Serial.println(“hello”) and delay(2000) in front of it to see if that command is hanging it up but I still get the same problem.

Would appreciate any help in getting this solved.

• iOS app
• Blynk server
• Blynk Library version (1.0.1)


/*************************************************************

  You’ll need:
   - Blynk IoT app (download from App Store or Google Play)
   - Arduino MKR1000 board
   - Decide how to connect to Blynk
     (USB, Ethernet, Wi-Fi, Bluetooth, ...)

  There is a bunch of great example sketches included to show you how to get
  started. Think of them as LEGO bricks  and combine them as you wish.
  For example, take the Ethernet Shield sketch and combine it with the
  Servo example, or choose a USB sketch and add a code from SendData
  example.
 *************************************************************/

// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID           "TMP##########"
#define BLYNK_DEVICE_NAME           "Quickstart Device"
#define BLYNK_AUTH_TOKEN            "###############################"


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


#include <SPI.h>
#include <WiFi101.h>
#include <BlynkSimpleWiFiShield101.h>

char auth[] = BLYNK_AUTH_TOKEN;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "#########";
char pass[] = "#########";

void setup()
{
  // Debug console
  SerialUSB.begin(115200);

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

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

You could try with the wifiNina library, because the Blynk MKR1010 samples uses this library instead of the wifi101.
Replace these lines:

#include <WiFi101.h>
#include <BlynkSimpleWiFiShield101.h>

with

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