MKR 1010 wifi goes offline after a few minutes (external powered)

Hi,

i ve seen some related topics concerning external powered MKR 1010 wifi, but even after trying to resolve this issue, my device keeps disconnecting after a few minutes.

  • powered 5V pin instead of Vin.
  • removed all serial statements in code.
  • upgraded to latest firmware version 1.5

So after doing this it does connect and send data. (previously not) but it disconnects after a while and it seems it doesnt try to go online again.

My test code is pretty simple

#include "thingProperties.h"
#define DHTPIN 7
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

void setup() {
  delay(1500); 

  initProperties();

  ArduinoCloud.begin(ArduinoIoTPreferredConnection);

  pinMode(LED_BUILTIN, OUTPUT);
  
  dht.begin();
}

void loop() {
  ArduinoCloud.update();

  digitalWrite(LED_BUILTIN, HIGH);  
  delay(1000);                      
  
  temperature = dht.readTemperature();
  humidity = dht.readHumidity();
  
  digitalWrite(LED_BUILTIN, LOW);   
  delay(1000);  
}

Anyone any idea what goes wrong ?

kind regards.

Can you try removing the delay(1000); inside your loop?

The usage of delays may interfere with the state machine, more details here

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.