Blynk.begin() passed variables?

Hi,

I’m having an issue where I have 1 virtual pin I’m trying to write to my app, similar to the example code PushData. The issue itself is that (with the timer configured how the example gave it) my widget should be updating once every second. However, it is updating around once every 10 seconds. I tried to decrease the timer on the timer itself, and this had no benefit - still around 10 seconds to update.

I was thinking that the standard baud rate might be insufficient. However, I have had enormous trouble trying to find the parameters passing into Blynk.begin(). I can’t find a way to successfully pass the baud rate. A different example code had a comment saying you could change the default baud rate by this: Blynk.begin(auth, 57600) but this does not work because the second parameter is not an integer.

My current code is below.

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <SPI.h>
#include <WiFi101.h>
#include <BlynkSimpleWiFiShield101.h>
#include <SimpleTimer.h>

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

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

int INCRE = 0;

SimpleTimer timer;

// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void sendUptime()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V4, millis()/1000);
  //INCRE++;
}

void setup()
{
  Serial.begin(250000); // See the connection status in Serial Monitor
  Blynk.begin(auth, ssid, pass);

  // Setup a function to be called every second
  timer.setInterval(100, sendUptime);
}

void loop()
{
  Blynk.run(); // Initiates Blynk
  timer.run(); // Initiates SimpleTimer
  //if (INCRE == 100){
  //  INCRE = 0;
  //}
}

I’m using an Arduino Zero with an Arduino Wifi 101 Shiled. Ultimately, I just can’t figure out why it’s going so slow with only one virtual pin trying to be updated. I’m not convinced it’s the baud rate but I can’t think of anything else.

Any advice?

Cheers

Hello. First strange thing I see - you do writes every 100 millis. But in output of V5 you send seconds. So for 10 invocations of Blynk.virtualWrite(V4, millis()/1000); you will always get same value, so it may seem as it not working.