I’ve connected Blynk to arduino via Hc05 bluetooth and i want to check virtual pin value (0 or 1) through Serial Monitor. I’ve tried going through docs.blynk.cc steps but still nothing comes out from the Serial Monitor.
Here’s my code:
#define BLYNK_USE_DIRECT_CONNECT
// You could use a spare Hardware Serial on boards that have it (like Mega)
#include <SoftwareSerial.h>
SoftwareSerial DebugSerial(0, 1); // RX, TX
//to print from Blynk
#define BLYNK_PRINT DebugSerial
//blueetooth connction library
#include <BlynkSimpleSerialBLE.h>
char auth[] = "57ac041e2a054fdb8d2368735c403f8a";
//Virtual Pin V1
BLYNK_WRITE(V1){
int U=param.asInt();
Serial.print("V1 BUTTON value is: ");
Serial.println(U);
}
//define baud rate here
void setup()
{
DebugSerial.begin(9600);
Serial.begin(9600);
Blynk.begin(Serial, auth);
}
//run blynk
void loop()
{
Blynk.run();
}