[SOLVED] Redbear Duo - problem with DEBUG

Hello,

I couldn’t make Redbear Duo to output any Blynk info on Serial.

The sketch prints on serial if I write:
Serial.print(“anything”);
but the standard routine for Blynk (below) doesn’t work.

#define BLYNK_DEBUG // Optional, this enables lots of prints #define BLYNK_PRINT Serial

Nothing being output to putty or Arduino console.
I think this might be a bug.

Thanks,
Jan

This should be put on the top of the sketch. Can you share your code?

Hello,

my code is below. It does print to Serial but nothing from blynk or Debug. Only the place where I put Serial.println gets printed. BTW - the serial was checked with Putty and with Arduino IDE. The code is being send to Redbear Duo via Particle Build Web IDE.

`    // This #include statement was automatically added by the Particle IDE.
#include "blynk/blynk.h"

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

char auth[] = "ae9833763bb04d3e9369811f55f9f9c5";

unsigned long previousMillis = 0;        // will store last time LED was updated
const long interval = 5000;
unsigned int num = 0;


void setup()
{
  Serial.begin(9600);
  delay(5000);
  Blynk.begin(auth);

}

void loop()
{
    unsigned long currentMillis = millis();
    if (currentMillis - previousMillis >= interval) {
        num++;
        previousMillis = currentMillis;
        Serial.print("This is serial output number: ");
        Serial.println(num);
    }
    
  Blynk.run();
}

@ethelder: Please read comments carefully:

You are true, and I feel dumb. I’ve never seen anything above declaration of libraries in Arduino sketch and so, I thought that I am as “on the top of the sketch” as possible. Still - putting this on the VERY top did the job.