I’ve been using the older Blynk for sometime, wanted to try the new version but am stumbling at the first stage of actually getting the device to show “Online”
To debug, I created a new Project in build.particle.io with the following code and added the blynk 1.0.0 library;
#define BLYNK_PRINT Serial // Defines the object that is used for printing
#define BLYNK_DEBUG // Optional, this enables more detailed prints
#include <blynk.h>
#define BLYNK_TEMPLATE_ID "myID"
#define BLYNK_DEVICE_NAME "myDEVICE"
//char auth[] = "myAUTH1"; // BLNK 0.6.4
char auth[] = "myAUTH2"; // BKNK 2.0
//WidgetLED GarageLED(V15);
void setup()
{
Serial.begin();
WiFi.clearCredentials();
WiFi.setCredentials("mySSID", "myPASS");
delay(2000); // Allow board to settle
Blynk.begin(auth);
}
void loop()
{
Blynk.run();
// GarageLED.on();
Serial.printlnf("led_ON");
delay(2000);
// GarageLED.off();
Serial.printlnf("led_OFF");
delay(2000);
}
I created a Template in the iOS Blynk app, and a device using the Blynk.Console webpage. Flashed the Photon with all the correct “myXXX” credentials, but it always shows as ‘Offline’ both in the iOS app and on the above webpage.
If I switch to my old auth code (for Blnk 0.6.4) the Photon connects okay. What am I missing? Is blynk 1.0.0 the correct library?