BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Arduino uno wifi rev 2 can't set up

Hi,

I am having trouble getting my device connected. I am using an Arduino Uno Wifi rev2 board. My blynk library version is 1.0.1. I have seen that it says in the list of supported hardware to use MKR WiFi 1010 example for the uno wifi rev 2 board. I have then selected my board as “Arduino MKR1000” and my connection as “Arduino wifi shield 101”. When i try to upload this code to my board i get the following errors.

In file included from C:\Users\Admin\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:36:0,
from C:\Users\Admin\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
from C:\Users\Admin\Documents\Arduino\libraries\Blynk\src/Adapters/BlynkWiFiCommon.h:24,
from C:\Users\Admin\Documents\Arduino\libraries\Blynk\src/BlynkSimpleWiFiShield101.h:19,
from C:\Users\Admin\OneDrive\Documents\FYP\Code\Uno\Uno.ino:27:
C:\Users\Admin\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function ‘long long int BlynkParam::iterator::asLongLong() const’:
C:\Users\Admin\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); }
^~~~~
C:\Users\Admin\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: note: suggested alternative: ‘atol’
long long asLongLong() const { return atoll(ptr); }
^~~~~
atol
C:\Users\Admin\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function ‘long long int BlynkParam::asLongLong() const’:
C:\Users\Admin\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); }
^~~~~
C:\Users\Admin\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 is my code:


// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID           "TMPLku1_viBB"
#define BLYNK_DEVICE_NAME           "Quickstart Device"
#define BLYNK_AUTH_TOKEN            "AzTvKBngOmwa05PJomky-LoEALnhidN-"


// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial


#include <SPI.h>
#include <WiFi101.h>
#include <BlynkSimpleWiFiShield101.h>

char auth[] = BLYNK_AUTH_TOKEN;

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

BlynkTimer timer;

// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
// that you define how often to send data to Blynk App.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V5, millis() / 1000);
}

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

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

  // Setup a function to be called every second
  timer.setInterval(1000L, myTimerEvent);
}

void loop()
{
  Blynk.run();
  timer.run(); // Initiates BlynkTimer
}


Hey there, check this out

Uno WiFi Rev 2 uses the WiFiNINA library, not WiFi101

Changing WiFi101 to WIFININA won’t solve the issue.

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.

1 Like