Cant connect arduino uno wifi rev 2(Mega 4809) to Blynk

Hi guys,
I am a beginner with arduino and blynk
Im using arduino uno wifi rev2(mega 4809), arduino IDE 1.8.16, Blynk app2.0 version 1.3.4
As it is stated in many topics that to use arduino MKR1010 examples for arduino uno wifi rev2 now when i am using this example my ide with library version1.0.1 is giving error that it cant compile for rev2 and when i downgrade my library to 0.6.1 the program is getting compiled but it is showing invalid token in serial monitor.
I dont understand what to do now it feels like a great problem.
Please help me solve this problem and also tell me how can i upload my sketch and error code as iam totally new to this community
Please help me at the ealiest
Thank you

You can’t use Blynk library version 0.6.1 with Blynk IoT.

Have you tried updating your WiFiNINA library?

Pete.

Hi guys,
I am a beginner with arduino and blynk
Im using arduino uno wifi rev2(mega 4809), arduino IDE 1.8.16, Blynk app2.0 version 1.3.4
As it is stated in many topics that to use arduino MKR1010 examples for arduino uno wifi rev2 now when i am using this example my ide with library version1.0.1 is giving error that it cant compile for rev2 and when i downgrade my library to 0.6.1 the program is getting compiled but it is showing invalid token in serial monitor.
I dont understand what to do now it feels like a great problem. :pensive:
Please help me solve this problem at the ealiest
Thank you

  Download latest Blynk library here:
    https://github.com/blynkkk/blynk-library/releases/latest

  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: http://www.blynk.cc
    Sketch generator:           http://examples.blynk.cc
    Blynk community:            http://community.blynk.cc
    Follow us:                  http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  This example shows how to use Arduino MKR 1010
  to connect your project to Blynk.

  Note: This requires WiFiNINA library
    from http://librarymanager/all#WiFiNINA

  Feel free to apply it to any other example. It's simple!
 *************************************************************/

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

/* Fill-in your Template ID (only if using Blynk.Cloud) */
//#define BLYNK_TEMPLATE_ID   "TMPLUYa6cPOC"


#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[] = "zbCT06aAvqEJDyqXi1F7Q-246ZstsE8S";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "AGP-Jr-Wi-Fi";
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();
}

Arduino: 1.8.16 (Windows 10), Board: “Arduino Uno WiFi Rev2, None (ATMEGA4809)”


Using library wifinina_1_8_13 at version 1.8.13 in folder: /home/builder/opt/libraries/wifinina_1_8_13

Using library blynk_1_0_1 at version 1.0.1 in folder: /home/builder/opt/libraries/blynk_1_0_1

In file included from /home/builder/opt/libraries/latest/blynk_1_0_1/src/Blynk/BlynkApi.h:36:0,

from /home/builder/opt/libraries/latest/blynk_1_0_1/src/BlynkApiArduino.h:14,

from /home/builder/opt/libraries/latest/blynk_1_0_1/src/Adapters/BlynkWiFiCommon.h:24,

from /home/builder/opt/libraries/latest/blynk_1_0_1/src/BlynkSimpleWiFiNINA.h:22,

from /tmp/750126321/Arduino_MKR1010_copy/Arduino_MKR1010_copy.ino:38:

/home/builder/opt/libraries/latest/blynk_1_0_1/src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::iterator::asLongLong() const':

/home/builder/opt/libraries/latest/blynk_1_0_1/src/Blynk/BlynkParam.h:48:50: error: 'atoll' was not declared in this scope

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

^~~~~

/home/builder/opt/libraries/latest/blynk_1_0_1/src/Blynk/BlynkParam.h:48:50: note: suggested alternative: 'atol'

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

^~~~~

atol

/home/builder/opt/libraries/latest/blynk_1_0_1/src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::asLongLong() const':

/home/builder/opt/libraries/latest/blynk_1_0_1/src/Blynk/BlynkParam.h:89:46: error: 'atoll' was not declared in this scope

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

^~~~~

/home/builder/opt/libraries/latest/blynk_1_0_1/src/Blynk/BlynkParam.h:89:46: note: suggested alternative: 'atol'

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

^~~~~

atol


Error during build: exit status 1

[759] Connecting to AGP-Jr-Wi-Fi
[1099] IP: 192.168.129.152
[1100]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.6.1 on Arduino UNO WiFi Rev2

[1230] Connecting to blynk-cloud.com:80
[1612] Invalid auth token

also suggest an alternative way to connect my arduino to blynk via wifi
i also tried wifi provisioning using edgent example and it gives out errors

@ZAID I’ve merged your second post into your original one.
Please don’t create multiple posts about the same subject, it gets very messy when people start replying in multiple locations.

I’d suggest that you read my response to your original post.

Pete.

Im sorry actually i am really tensed about ths project

@PeteKnight i have the latest WiFiNINA library version 1.8.13

Your code is missing the Template ID, and this needs to be the first line of your sketch.

Pete.

@PeteKnight i have added it and still im getting same error and im using arduino web editor as i have messed up my libraries for my arduino IDE



/*************************************************************
  Download latest Blynk library here:
    https://github.com/blynkkk/blynk-library/releases/latest

  Blynk is a platform with iOS and Android apps to controlA
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: http://www.blynk.cc
    Sketch generator:           http://examples.blynk.cc
    Blynk community:            http://community.blynk.cc
    Follow us:                  http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  This example shows how to use Arduino MKR 1010
  to connect your project to Blynk.

  Note: This requires WiFiNINA library
    from http://librarymanager/all#WiFiNINA

  Feel free to apply it to any other example. It's simple!
 *************************************************************/

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

/* Fill-in your Template ID (only if using Blynk.Cloud) */
#define BLYNK_TEMPLATE_ID   "TMPLUYa6cPOC"


#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[] = "zbCT06aAvqEJDyqXi1F7Q-246ZstsE8S";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "AGP-Jr-Wi-Fi";
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();
}

Using library wifinina_1_8_13 at version 1.8.13 in folder: /home/builder/opt/libraries/wifinina_1_8_13

Using library blynk_1_0_1 at version 1.0.1 in folder: /home/builder/opt/libraries/blynk_1_0_1

In file included from /home/builder/opt/libraries/blynk_1_0_1/src/Blynk/BlynkApi.h:36:0,

from /home/builder/opt/libraries/blynk_1_0_1/src/BlynkApiArduino.h:14,

from /home/builder/opt/libraries/blynk_1_0_1/src/Adapters/BlynkWiFiCommon.h:24,

from /home/builder/opt/libraries/blynk_1_0_1/src/BlynkSimpleWiFiNINA.h:22,

from /tmp/642170011/Arduino_MKR1010_copy/Arduino_MKR1010_copy.ino:41:

/home/builder/opt/libraries/blynk_1_0_1/src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::iterator::asLongLong() const':

/home/builder/opt/libraries/blynk_1_0_1/src/Blynk/BlynkParam.h:48:50: error: 'atoll' was not declared in this scope

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

^~~~~

/home/builder/opt/libraries/blynk_1_0_1/src/Blynk/BlynkParam.h:48:50: note: suggested alternative: 'atol'

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

^~~~~

atol

/home/builder/opt/libraries/blynk_1_0_1/src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::asLongLong() const':

/home/builder/opt/libraries/blynk_1_0_1/src/Blynk/BlynkParam.h:89:46: error: 'atoll' was not declared in this scope

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

^~~~~

/home/builder/opt/libraries/blynk_1_0_1/src/Blynk/BlynkParam.h:89:46: note: suggested alternative: 'atol'

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

^~~~~

atol

Error during build: exit status 1

@ZAID you are using blynk IOT right ?

@IoTDude where you able to upload it to arduino uno wifi rev2?

@John93 yes im using blynk IoT which the new one not the old blynk legacy

@ZAID if you continue to post questions about the same issue in multiple topics then your forum account will be suspended.

Please consider this to be your last warning about this.

Pete.

1 Like

@ZAID first Add BLYNK_TEMPLATE_ID and BLYNK_DEVICE_NAME on top of your firmware, above any includes.

Second please listen to Pete advice.

1 Like

@PeteKnight im just trying to find answers
i didnt realize the confusion this would cause.
i wont repeat it

@John93 is this the correct way??



#define BLYNK_TEMPLATE_ID "TMPLUYa6cPOC"
#define BLYNK_DEVICE_NAME "Quickstart Device"

/*************************************************************
  Download latest Blynk library here:
    https://github.com/blynkkk/blynk-library/releases/latest

  Blynk is a platform with iOS and Android apps to controlA
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials: http://www.blynk.cc
    Sketch generator:           http://examples.blynk.cc
    Blynk community:            http://community.blynk.cc
    Follow us:                  http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  This example shows how to use Arduino MKR 1010
  to connect your project to Blynk.

  Note: This requires WiFiNINA library
    from http://librarymanager/all#WiFiNINA

  Feel free to apply it to any other example. It's simple!
 *************************************************************/

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




#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[] = "zbCT06aAvqEJDyqXi1F7Q-246ZstsE8S";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "AGP-Jr-Wi-Fi";
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();
}

i am getting the same error

How did you get the auth token ?

@John93 i took it from the blynk dashboard

Yes that’s right, now everything should work just fine.

@John93 it is not compiling

@ZAID I’m gonna try something and I will let you know.

1 Like