Arduino UNO Wifi rev2 with Blynk --> Compiler Error

Hello

I am trying to compile the recomended example sketch from the Blynk Library to my Arduino UNO Wifi rev2.

Following Error appears:


Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Uno WiFi Rev2, None (ATMEGA4809)"

In file included from C:\Users\Documents\Arduino\libraries\blynk-library-master\src/Blynk/BlynkApi.h:36:0,

             from C:\Users\Documents\Arduino\libraries\blynk-library-master\src/BlynkApiArduino.h:14,

             from C:\Users\Documents\Arduino\libraries\blynk-library-master\src/Adapters/BlynkWiFiCommon.h:24,

             from C:\Users\Documents\Arduino\libraries\blynk-library-master\src/BlynkSimpleWiFiNINA.h:22,

             from C:\Users\SVENBU~1\AppData\Local\Temp\arduino_modified_sketch_998524\Arduino_MKR1010.ino:36:

C:\Users\Documents\Arduino\libraries\blynk-library-master\src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::iterator::asLongLong() const':

C:\Users\Documents\Arduino\libraries\blynk-library-master\src/Blynk/BlynkParam.h:48:50: error: 'atoll' was not declared in this scope

     long long   asLongLong() const  { return atoll(ptr); }

                                              ^~~~~

C:\Users\Documents\Arduino\libraries\blynk-library-master\src/Blynk/BlynkParam.h:48:50: note: suggested alternative: 'atol'

     long long   asLongLong() const  { return atoll(ptr); }

                                              ^~~~~

                                              atol

C:\Users\Documents\Arduino\libraries\blynk-library-master\src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::asLongLong() const':

C:\Users\Documents\Arduino\libraries\blynk-library-master\src/Blynk/BlynkParam.h:89:46: error: 'atoll' was not declared in this scope

 long long   asLongLong() const  { return atoll(buff); }

                                          ^~~~~

C:\Users\Documents\Arduino\libraries\blynk-library-master\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.


I want to compile the following Example Sketch:


#define BLYNK_PRINT Serial

/* Fill-in your Template ID (only if using Blynk.Cloud) */
#define BLYNK_TEMPLATE_ID   "TMPLVFNNCOih"
#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[] = "MyAuth";

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

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();
}

Does anyone understand this error??

Thanks for helping
Sven

@svenbu, your topic has been moved to a more suitable location on the forum.

1 Like

Where is your function atoll()

I dint use this function. I dont even know what it is doing. It must be a function in one of the libraries , problably the blynk.

https://www.cplusplus.com/reference/cstdlib/atoll/

Does anyone know how to fix that? Is the Arduino not working with atoll()?

Some do, some don't depending on the processor used
For instance this compiles with an ESP32 as the target

void setup()
{
  Serial.begin(115200);
  char aLongLong[] = {"2147483647"};
  long long aVariable;
  aVariable = atoll(aLongLong);
  Serial.println(aVariable);
}

void loop()
{
}

but it won't compile for a Uno with a 328 processor

okey, thanks for the answer. Do you know if I can change that somehow? Is there for example something to doo, that the library still works, but the code doesnt write things to longlong?

The Arduino uno wifi rev 2 has the ATMEGA4809.

No guarantees, but add this line immediately before the setup() function and report back what happens when you compile the sketch

#define BLYNK_NO_LONGLONG

Thanks for your Answer
Sadly, It happens the same as before.. same Error

Then I am out of ideas

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.