Dear Friends,
a couple of days ago I did the Arduino OAK package update to 1.0.2 and this update includes the blynk 0.3.7 library. I running Windows 7 64 bits and Arduino 1.6.8 IDE.
First I noticed that it is changed the way that we connected to blynk server, before this update and the official support of the OAK in blynk ecosystem we used: Blynk.begin(auth); now as I discovered by the related OAK example the NEW way is: Blynk.config(auth);
OK till now, in order to see the new library and to play with the new OAK update, I wrote a very simple sketch that compiled and OTA to OAK without any problem ( I did several times to be sure… )
The problem is that the bellow quoted sketch does not work, no virtual led blinking (V1) the hardware pin (1 , that is the LED fitted in OAK) does not change nothing happened. (Sorry at the moment I did not connect Serial to USB to see the debugging messages).
Can you see the problem at my sketch or can you explain what is wrong?
#define Version "0.1"
#define WellcomeLine1 " Mike Kranidis "
#define WellcomeLine2 "release Ver="
/// Support OAK packakge 1.0.2 and the incorporated by OAK blynk 0.3.7 library ///
/// V1 RUN? LED widget flashing once per second to give the running impression of OAK on V1 ///
#define BLYNK_PRINT Serial // Enables Serial Monitor
#include <ESP8266WiFi.h>
#include <BlynkSimpleEthernet.h>
#include <SimpleTimer.h>
char auth[] = "my correct auth is been writed here";
WidgetLED led1(V1);
SimpleTimer timer;
void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
BLYNK_LOG("LED1: off");
} else {
led1.on();
BLYNK_LOG("LED1: on");
}
}
void setup()
{
Serial.begin(9600);
Blynk.config(auth);
// Setup a function to be called every second
timer.setInterval(1000L, blinkLedWidget);
}
void loop()
{
Blynk.run(); // All the Blynk Magic happens here...
timer.run();
// to avoid delay() function!
}
`