Hello, I am a beginner with the new version of Blynk
I am using
Arduino Uno Wifi Rev2 (MEGA4809)
Arduino IDE 1.8.16
Blynk App 2.0
I choose the Blynk Examples to connect my board to internet, however I fail to upload the code into the board.
Examples: Blynk → Boards_Wifi -->Arduino_MKR1010
Library: WifiNINA version 1.8.13
Library: Blynk Version 1.0.1
And here is the error messages
In file included from E:\Cloud\Dropbox\Arduino\libraries\arduino_813015\src/WiFiStorage.h:23:0,
from E:\Cloud\Dropbox\Arduino\libraries\arduino_813015\src/WiFi.h:38,
from E:\Cloud\Dropbox\Arduino\libraries\arduino_813015\src/WiFiNINA.h:23,
from E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\examples\Boards_WiFi\Arduino_MKR1010\Arduino_MKR1010.ino:37:
E:\Cloud\Dropbox\Arduino\libraries\arduino_813015\src/utility/wifi_drv.h:293:12: error: ‘PinStatus’ does not name a type
Yes I have chosen arduino uno WIFI rev2 in arduino IDE
Sometimes it comes out error message like this
In file included from E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/Blynk/BlynkApi.h:36:0,
from E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/BlynkApiArduino.h:14,
from E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/Adapters/BlynkWiFiCommon.h:24,
from E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/BlynkSimpleWiFiNINA.h:22,
from E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\examples\Boards_WiFi\Arduino_MKR1010\Arduino_MKR1010.ino:38:
E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/Blynk/BlynkParam.h: In member function ‘long long int BlynkParam::iterator::asLongLong() const’:
E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/Blynk/BlynkParam.h:48:50: error: ‘atoll’ was not declared in this scope
long long asLongLong() const { return atoll(ptr); }
^~~~~
E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/Blynk/BlynkParam.h:48:50: note: suggested alternative: ‘atol’
long long asLongLong() const { return atoll(ptr); }
^~~~~
atol
E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/Blynk/BlynkParam.h: In member function ‘long long int BlynkParam::asLongLong() const’:
E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\src/Blynk/BlynkParam.h:89:46: error: ‘atoll’ was not declared in this scope
long long asLongLong() const { return atoll(buff); }
^~~~~
E:\Cloud\Dropbox\Arduino\libraries\arduino_483770\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.
/* 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 "TMPLx8at8oPD"
#define BLYNK_DEVICE_NAME "WSC Coral Tank 1"
#define BLYNK_AUTH_TOKEN "bQWUj2rAOMkMEb8g5E9yll4NjaKgWy4i";
#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[] = "bQWUj2rAOMkMEb8g5E9yll4NjaKgWy4i";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Maggiendi";
char pass[] = "1582728300000123456789";
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();
}
The link “blynk-cloud . com” should be without spaces before and after the dot. This is because of my limitation on posting a reply.
@Endi_Wong please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```
Actually this board is one of the worst boards I’ve ever tried, it’s not even supported in the arduino IOT cloud. So I highly recommend you to get a different board like esp32, nodemcu, arduino MKR WIFI 1010, arduino nano 33 IOT, arduino MKR 1000 etc…
I don’t think anyone is saying that this board doesn’t work with Blynk IoT, simply that it’s a difficult board to master and a poor choice for a beginner with any system.
Converting working Blynk Legacy code to Blynk IoT code should simply be a case of adding two additional lines of code at the very beginning of the sketch and re-compiling with the new Blynk libraries.
the code that i am use, is this one below, and this did not compile with last version of Blynk
with version 0.60 of blynk compile but said taht did invalid token
… #define BLYNK_PRINT Serial
/* Fill-in your Template ID (only if using Blynk.Cloud) */
//#define BLYNK_TEMPLATE_ID “TMPLkbJH_Tlw”
@cadaval please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```
@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: