Blynk Library for Arduino v0.4.1 is released

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

Okā€¦ thanks for the optimization advices, the most important thing, now for me, is that using Blynk.config and Blynk.connect my sketch continue to the next line even isnā€™t connected to the server (non blocking).

The first time I must specify all data (user, pass, and so on) to be used the next times or also I can store parameters in the ESP using AT command in a seperate way.

You canā€™t use wifi in Blynk.confg() as the function is defined as:

void config(const char* auth,
            IPAddress   ip,
            uint16_t    port = BLYNK_DEFAULT_PORT)

So just Blynk token, IP address and port number. For your variable names, and before I upgrade to the v0.4.1, the following compiles and the ESP connects.

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

@saurabh47 I fixed it! Iā€™ve installed Arduino Ide 1.6.13 and now works! Thanks

2 Likes

where is the new local server?

EDIT: obviously, it is where it ALWAYS is, my bad :frowning:

1 Like

oh well, i broke my Pi upgrading the local server, i am assuming an issue my end, but wondering if anyone else got local server glitch?

and no, i did not have my Blynk projects backed up. :frowning:

EDIT: fixed now.

hello!

after upgrading to new app, how can i pair/connect bluetooth modules in the app?
the bluetooth widget is greyed out, it says already installed, but it is not :slight_smile:

It works in good old way for me.

yes, but what if you create a new project?

iā€™ll try wait a minute.
nope, nothing has changed.

hm, thatā€™s strange. for me, if i use bluetooth in one project, and create a new one, the bluetooth widget is greyed out in the second project. i will clear the cache and reinstall the app.

thanks for the reply!

Yeah, you cannot have 2 BT projects. I think thatā€™s because BT cannot handle more than one device.

but what if i have several bluetooth modules, and i pair / unpair them before using the respective project???

for example, i have a diy fruit dehydrator, with blynk + bluetooth, and now iā€™m building an electronic/ automatic bike hub shifter, also with bluetooth interface?

Thatā€™s question for Blynk guys @Dmitriy

ok. thank you!

Thatā€™s correct. At the moment we support only 1 BT widget and 1 BLE. It is possible to make multiple BT connections however it is not trivial.

I just updated to 0.4.1 and the exact same code that compiled nicely on 0.4.0 now does not compile. I get the following error, any help would be appreciated (I am running 1.6.13):

Build options changed, rebuilding all
In file included from E:\OneDrive\OneDrive\My Arduino Code Library 22Oct2016\Arduino\Home.ino:208:0:

C:\Users\mda\Documents\Arduino\libraries\Blynk\src/WidgetRTC.h:28:12: error: 'time_t' does not name a type

     static time_t requestTimeSync();

            ^

In file included from E:\OneDrive\OneDrive\My Arduino Code Library 22Oct2016\Arduino\Home.ino:208:0:

C:\Users\mda\Documents\Arduino\libraries\Blynk\src/WidgetRTC.h:34:35: error: no 'time_t WidgetRTC::requestTimeSync()' member function declared in class 'WidgetRTC'

 time_t WidgetRTC::requestTimeSync()

                                   ^

C:\Users\mda\Documents\Arduino\libraries\Blynk\src/WidgetRTC.h: In member function 'void WidgetRTC::begin()':

C:\Users\mda\Documents\Arduino\libraries\Blynk\src/WidgetRTC.h:45:21: error: 'requestTimeSync' was not declared in this scope

     setSyncProvider(requestTimeSync);

                     ^

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

@mars, please show your exact same codeā€¦ and maybe start a different topic?

ok - just created new topic with code

Try to delete old libraries and then install new.