Hi,
I have a MKR1400 GSM and some nano IoT 33 boards. I have endless issues with the usb connecting and disconnecting all the time. I have asked many for assitance but could not find anybody that can help me solve this. I did all the usaul things like a seperate powersupply, duble tap the reset button, upload a blink sketch, use the USB2 port in place of a USB 3 port and so and so on. Makes abselutly no difference. This is alwas a problem whan I work on the IoT cloud.
The only thing left before I chusck all of them in rubbish bin is that there is something in my code that disrupt the native USB port. Below is super simple code. Not even this runs without having the usb disconnecting and reconeccting as it see fit.
This is my qeustion. What is some pointers to write code that will not interfere with that USB port?
#include "thingProperties.h"
#include <MKRGSM.h>GSM modem;
bool status = false;
long startTime;
long stopTime;
int motorRun;void setup() {
*** Serial.begin(9600);***
*** delay(1500);***
*** initProperties();****** ArduinoCloud.begin(ArduinoIoTPreferredConnection);***
*** setDebugMessageLevel(2);***
*** ArduinoCloud.printDebugInfo();****** pinMode(LED_BUILTIN, OUTPUT);***
*** counter = 0;***
*** baler_Start_Stop = false;***
*** modem.begin();***
}void loop() {
*** ArduinoCloud.update();***
*** if (status == false) {***
*** digitalWrite(LED_BUILTIN, HIGH);***
*** status = true;***
*** baler_Start_Stop = true;***
*** } else {***
*** digitalWrite(LED_BUILTIN, LOW);***
*** status = false;***
*** baler_Start_Stop = false;***
*** }****** counter++;***
*** delay(500);***
*** rawTime = modem.getTime();***}