Hello guys, my Cayenne is getting offline for about 15 seconds everytime I send a “virtualWrite” command, I wanna know what’s wrong with my code
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <UIPEthernet.h>
#include <BlynkSimpleUIPEthernet.h>
#include <CayenneDefines.h>
#include <CayenneEthernetClient.h>
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "xxxxxxxxx";
const int buttonPin = 2;
int buttonState = 0;
void setup()
{
Serial.begin(9600);
Cayenne.begin(token);
pinMode(buttonPin, INPUT);
}
void loop()
{
Cayenne.run();
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
Cayenne.virtualWrite(V0, "1");
}
}