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

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

People could you tell me if anybody alreday solve this issue on UNO WIFI REV 2, where just compile on BLYNK version 6.01, but did not work with blynk IOT, becasue said Invalid auth token, and when we use last version of blynk DID NOT COMPILE :frowning: :frowning:

this is very fraustration, becasue i have a lot of project associated to UNO WIFO REV 2

anybody can help please?

thanks a lot for any help.

I highly recommend you to get a new board.
https://docs.blynk.io/en/blynk.edgent/supported-boards

The 0.6.1 library will always try to connect to the Legacy Blynk servers, unless you specifically tell it not to. This means that when it tries to pass the Blynk IoT auth token to the Legacy server it won’t recognise the token.

I don’t think that trying to force the 0.6.1 library to connect to the new IoT cloud servers is the correct solution.

Without knowing more about your particular compiler error messages, along with which version of the WiFiNINA library you have installed, and how exactly you installed that library, then it’s very difficult to comment in a constructive way.

Pete.

Pete

always present :slight_smile: thanks a lot for your answer

WIFiNINA Library i am use 1.4.8. last update

errors after compile here

Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Placa:“Arduino Uno WiFi Rev2, ATMEGA328”

In file included from C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:36:0,

             from C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk.h:14,

             from C:\Users\EliteBook 8560\OneDrive\Documentos\PROJECTOS ARDUINO\TESTE_WIFI_conecttion_BLYNK\TESTE_WIFI_conecttion_BLYNK.ino:27:

C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function ‘long long int BlynkParam::iterator::asLongLong() const’:

C:\Users\EliteBook 8560\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\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: note: suggested alternative: ‘atol’

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

                                              ^~~~~

                                              atol

C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function ‘long long int BlynkParam::asLongLong() const’:

C:\Users\EliteBook 8560\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\EliteBook 8560\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

Erro ao compilar para a placa Arduino Uno WiFi Rev2.