Blynk Library for Arduino v0.4.1 is released

:point_right: In this release, just new fancy ASCII art logos!

     ___  __          __
    / _ )/ /_ _____  / /__
   / _  / / // / _ \/  '_/
  /____/_/\_, /_//_/_/\_\
         /___/    v0.4.1

Joking :wink:

  • New hardware support:
  • SIM800/SIM900 (TCP stream and HTTP API examples)
  • Arduino GSM Shield (HTTP API)
  • Samsung ARTIK
  • New features:
  • Blynk.begin() now blocks until server is connected
  • Unlimited count of parameters for virtualWrite() and setProperty()
  • Blynk.syncVirtual() now supports multiple virtual pins
  • CUSTOM_BOARD support for App Export
  • Re-written HTTP API examples
  • Widgets:
  • Widgets now support setLabel() and setColor()
  • WebHook widget example for GET method
  • Map widget example (will be released very soon)
  • Infrastructure:
  • Use delay(0) instead of yield() for better portability
  • Boards detector now detects even more boards
  • Updated blynk-ser.sh script
  • Indenter script updated
  • Add board description generator sketch
  • Add build test script for all boards from the menu in Arduino/Energia IDE
  • Added .gitattributes
  • Travis CI updated

You can grab the latest version here:

Hope you like this update, please post your feedback here. :+1:

P.S. Don’t forget to give a “star” to our project on github - we’re very close to top 10 libraries!

5 Likes

Page not found…

fixed.

@vshymanskyy how do we bypass the block you have introduced for Blynk.begin()?

@Costas, - use Blynk.config() if you want custom connection management

1 Like

As i can see BLYNK_APP_CONNECTED() is also included in this update. I should use it like other blynk functions right? (like BLYNK_WRITE(Vpin))

Where did you see it? ) it’s not included

Well, i just added that to my code and it compiled without any errors, so I was thinking that it is included :smiley:

Hi what is exactly meant by “Blynk.begin() now blocks until server is connected” do you mean it will wait forever until its connected ?

@mars blocking is needed for many users as pretty much all the sample sketches simply had Blynk.begin() and when you start adding Widgets like RTC they are quite often skipped without blocking.

Search GitHub, docs and this site for Blynk.config() which doesn’t block.

so given the changes in 0.4.1 does that mean the Blynk.begin will wait forever until it connects to a Blynk server (or is there a configurable time-out parameter, either in Blynkconfig.h or local blynkserver) ?

Hi.
I have a problem with the 0.4.1 library version. I copied manually libraries into my Arduino Library folder, but now (even in basic ESP8266_standalone sketch from example) I’ve got various errors:
In file included from C:\Program Files (x86)\Arduino\libraries\Blynk\src/WidgetRTC.h:14:0,

             from C:\Program Files (x86)\Arduino\libraries\Blynk\src\WidgetRTC.cpp:13:

C:\Program Files (x86)\Arduino\libraries\Blynk\src/Blynk/BlynkWidgetBase.h: In member function ‘void BlynkWidgetBase::setLabel(Args …)’:

C:\Program Files (x86)\Arduino\libraries\Blynk\src/Blynk/BlynkWidgetBase.h:27:9: error: ‘Blynk’ was not declared in this scope

     Blynk.setProperty(mPin, "label", args...);

     ^

C:\Program Files (x86)\Arduino\libraries\Blynk\src/Blynk/BlynkWidgetBase.h: In member function ‘void BlynkWidgetBase::setColor(Args …)’:

C:\Program Files (x86)\Arduino\libraries\Blynk\src/Blynk/BlynkWidgetBase.h:32:9: error: ‘Blynk’ was not declared in this scope

     Blynk.setProperty(mPin, "color", args...);

     ^

In file included from C:\Program Files (x86)\Arduino\libraries\Blynk\src\WidgetRTC.cpp:13:0:

C:\Program Files (x86)\Arduino\libraries\Blynk\src/WidgetRTC.h: In static member function ‘static time_t WidgetRTC::requestTimeSync()’:

C:\Program Files (x86)\Arduino\libraries\Blynk\src/WidgetRTC.h:37:5: error: ‘Blynk’ was not declared in this scope

 Blynk.syncVirtual(instance()->mPin);

 ^

C:\Program Files (x86)\Arduino\libraries\Blynk\src\WidgetRTC.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\Blynk\src\WidgetRTC.cpp:15:20: error: ‘uint8_t WidgetRTC::mPin’ is not a static member of ‘class WidgetRTC’

uint8_t WidgetRTC::mPin;
How can I fix this? Thanks!

Which Arduino ide version are you using??

@saurabh47 1.6.11

I had same RTC issue on ide 1.6.5
Now i have 1.6.12 no RTC issue.
I haven’t tried blynk library 0.4.1
But I advise you to try 1.6.12

Delete all old libraries and then install new. I just fixed it in that way

1 Like

… so now the “non blocking way” is this?

  Blynk.config(wifi, auth, myBlynkServer, 8442);
  Blynk.connectWiFi(ssid, pass);

This is correct?

Just move <Time.h> inclusion before <WidgetRTC.h>…

@naamah75 the way we use Blynk.config () is as follows:

  1. ssid and pass are stored in ESP’s after the first connection so don’t specifically need to be included in a Blynk sketch i.e. you can store the ssid and pwd with a basic Arduino sketch, WiFi Manager (if you wish to change the WiFi credentials) and other tools etc.

  2. Then simply:

  Blynk.config(auth, server, port);
  unsigned long maxMillis=millis() + 8000;
  while ((Blynk.connect() == false) && ( millis() <= maxMillis)) {
  }

If you actually want to use ssid and pwd in your Blynk sketch then use regular WiFi commands BEFORE the Blynk.config() command.

Edited to show usual variable names in Blynk.config() function.