I have successfully compiled and upload code to my arduino. However, the serial console says that I have an invalid auth token. I have check and verified the auth token, template ID, and Device name on my Blynk dashboard and all are accurate. Any advice pointers welcomed.
#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "TMPLR-gc-HhM"
#define BLYNK_DEVICE_NAME "Pool"
#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>
char ssid[] = "XXXXXX"; // your network SSID (name)
char pass[] = "XXXXXXXXX"; // your network password (use for WPA, or use as key for WEP)
char auth[] = "XXXXXXXXXX";
void setup() {
Serial.begin (9600);
Blynk.begin(auth, ssid, pass);
}
void loop() {
Blynk.run();
}
Serial Console Output:
14:41:26.866 → [1989406] Connecting to blynk-cloud.com:80
14:41:27.287 → [1989811] Invalid auth token
14:41:35.838 → [1998406] Connecting to blynk-cloud.com:80
14:41:36.164 → [1998760] Invalid auth token
Blynk version 1.0.1 does not seem to work with my hardware. How can I get version 0.6.0 to work with Blynk IoT or is the Arduino Uno Rev 2 not supported by Blynk anymore.
You can’t. It’s a pre-Blynk IoT library that is only compatible with Blynk Legacy.
I’m not aware of any incompatibility between library version 1.0.1 and your hardware, but I’m not an Arduino user myself.
Maybe if you shared information about exactly what issues you’re experiencing with your hardware and Blynk 1.0.1 rather than focusing on using an old library with the new version, then you may find a solution.
Ok. Here are the errors I have been experiencing whenever loading version 1.0.1 of Blynk. All of them seem to be within the header files.
Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Arduino Uno WiFi Rev2, ATMEGA328"
In file included from E:\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:36:0,
from E:\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
from E:\Documents\Arduino\libraries\Blynk\src/Adapters/BlynkWiFiCommon.h:24,
from E:\Documents\Arduino\libraries\Blynk\src/BlynkSimpleWiFiNINA.h:22,
from E:\Documents\Arduino\Pool_Sensor\Pool_Sensor_blyk\Pool_Sensor_blyk.ino:18:
E:\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::iterator::asLongLong() const':
E:\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: error: 'atoll' was not declared in this scope
long long asLongLong() const { return atoll(ptr); }
^~~~~
E:\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: note: suggested alternative: 'atol'
long long asLongLong() const { return atoll(ptr); }
^~~~~
atol
E:\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::asLongLong() const':
E:\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:89:46: error: 'atoll' was not declared in this scope
long long asLongLong() const { return atoll(buff); }
^~~~~
E:\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:89:46: note: suggested alternative: 'atol'
long long asLongLong() const { return atoll(buff); }
^~~~~
atol
exit status 1
Error compiling for board Arduino Uno WiFi Rev2.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
There are no updates available under board manager. Code seemed to compile when I changed it to MKR 1001. Same errors result when switching back to Arduino Wifi Rev 2. It seems that the Arduino Uno Wifi Rev 2 is no longer supported.