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 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