BLYNK
BLYNK.IO       📲 GETTING STARTED       đź“— DOCS       👉 SKETCH BUILDER

How to connect Arduino Uno WiFi Rev2 to Blynk.Cloud

I cannot connect my Arduino UNO WiFi Rev2 to Blynk.Cloud. I tried the code in Connecting Arduino UNO Rev2 WIFI to blynk app, but it didn’t compile. So I tried this code :

 #define BLYNK_TEMPLATE_ID   "*****************"
#define BLYNK_DEVICE_NAME   "***********"
#define BLYNK_AUTH_TOKEN "************************"
#define BLYNK_PRINT Serial

/* Fill-in your Template ID (only if using Blynk.Cloud) */



#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "**********************";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "********";
char pass[] = "*************";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
} 

but it gave me this error :

Arduino: 1.8.16 (Mac OS X), Board: "Arduino Uno WiFi Rev2, ATMEGA328"
In file included from /Users/warrickcleet/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkApi.h:36:0,
                 from /Users/warrickcleet/Documents/Arduino/libraries/Blynk/src/BlynkApiArduino.h:14,
                 from /Users/warrickcleet/Documents/Arduino/libraries/Blynk/src/Adapters/BlynkWiFiCommon.h:24,
                 from /Users/warrickcleet/Documents/Arduino/libraries/Blynk/src/BlynkSimpleWiFiNINA.h:22,
                 from /Users/warrickcleet/Documents/Arduino/Working/Working.ino:35:
/Users/warrickcleet/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::iterator::asLongLong() const':
/Users/warrickcleet/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); }
                                                  ^~~~~
/Users/warrickcleet/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkParam.h:48:50: note: suggested alternative: 'atol'
         long long   asLongLong() const  { return atoll(ptr); }
                                                  ^~~~~
                                                  atol
/Users/warrickcleet/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::asLongLong() const':
/Users/warrickcleet/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); }
                                              ^~~~~
/Users/warrickcleet/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.
I hope you can help.

Yours faithfully
Warrick

First, please edit your post and add triple backticks ( ``` ) before and after your sketch.

Second, I highly recommend you to use a different board.

I flagged this bug with the Blynk developers recently…

Pete.

UPDATE on how to fix this error…

@Andyy has figured-out how to fix this issue, the solution is to edit the Arduino\libraries\Blynk\src\Blynk\BlynkParam.h file in the library as documented here:

Pete.

16 posts were split to a new topic: Problems with Arduino Uno Wifi Rev2