Photon is Off line using Blynk library 0.36 need the latest lib in IDE 0.37

HI All,

Can’t get a build using the Web IDE of blynk library 0.36 to work with the iOS Blynk app using a Photon.

What the Blynk iOS app shows is “Photon Off line”.

Blynk tells me I am not using the latest libarry (0.37). When I go into the IDE I can only see (0.36 June).

The blynk co-founder tells me I need the latest library (0.37).

Questions.

  1. How do I tell what a previous build is using library for library?
  2. How do I get the 0.37 release into the IDE?

ChipMonk

@chipmonk, the Blynk folks (Volodymyr) are the owners of the IDE library and are responsible for updates. I just posted an issue on github asking for the update. I’ll do the same in the Blynk forum.

Thanks!

1 Like

In the mean time, you can add the library manually, after downloading/copying it from github by following this: https://docs.particle.io/guide/getting-started/build/photon/#adding-files-to-your-app

HI Moors7,

Is there an easy way to import into the IDE these files? It’s very tedious using copy paste from GVIM to the web ide.

Does the IDE have a env variable that I can point to these blynk library? What I am getting are errors no in the IDE not finding .h files in the correct path Seems that I will have to go make my own flat Blynk library to get this to work.

Forgive me for these questions as I am a old ASIC builder.

ChipMonk

I’m afraid copy & pasting is the only way for the web IDE. With Particle Dev you could download the repo and use that as a directory which should make things slightly easier. You can also use your own IDE and compile using the CLI if that’s more comfortable.

Hi Moors7,

I agree. When I tried to download the library from git hub I still can’t get it to compile. Tried using the offlne compiler in Atom but it seems the SSH host is offline.

When I tired the command line compiler I have to include all the files in one large massive ugly file. For the command line.

I must be missing something basic with the IDE and the CLI compilers.

ChipMonk

With the latest CLI you just need to have all library files in a subdirectory (or on the same level) with your .ino file and the include statements need to be as if all files were in a flat directory.

e.g. for this file structure

C:\test\main.ino
C:\test\firmware\lib1\lib1.h
C:\test\firmware\lib1\lib1.cpp
C:\test\privatelib\pl.h
C:\test\privatelib\pl.cpp

you’d use these includes

#include "lib1.h"
#include "pl.h"

since CLI collects all source files found in the project folder and subdirectories and uploads them to the build farm into one flat temp directory for building.

Hi ScruffR,

I must not have my enviroment setup correctly.

Here’s what I get when I compile butte_proj directory

particle compile photon butte_proj/

Compiling code for photon

Including:
butte_proj/main_ping.ino
butte_proj/blynk-library-spark-master/firmware/BlynkApi.h
/butte_proj/blynk-library-spark-master/firmware/BlynkApiParticle.h
butte_proj/blynk-library-spark-master/firmware/BlynkConfig.h
butte_proj/blynk-library-spark-master/firmware/BlynkDebug.h
butte_proj/blynk-library-spark-master/firmware/BlynkDetectDevice.h
butte_proj/blynk-library-spark-master/firmware/BlynkHandlers.h
butte_proj/blynk-library-spark-master/firmware/BlynkParam.h
butte_proj/blynk-library-spark-master/firmware/BlynkParticle.h
butte_proj/blynk-library-spark-master/firmware/BlynkProtocol.h
butte_proj/blynk-library-spark-master/firmware/BlynkProtocolDefs.h
butte_proj/blynk-library-spark-master/firmware/BlynkSimpleParticle.h
butte_proj/blynk-library-spark-master/firmware/BlynkUtility.h
butte_proj/blynk-library-spark-master/firmware/BlynkWidgets.h
butte_proj/blynk-library-spark-master/firmware/WidgetBridge.h
butte_proj/blynk-library-spark-master/firmware/WidgetLCD.h
butte_proj/blynk-library-spark-master/firmware/WidgetLED.h
butte_proj/blynk-library-spark-master/firmware/WidgetTerminal.h
butte_proj/blynk-library-spark-master/firmware/blynk.h
butte_proj/blynk-library-spark-master/firmware/BlynkDebug.cpp
butte_proj/blynk-library-spark-master/firmware/BlynkHandlers.cpp
butte_proj/blynk-library-spark-master/firmware/blynk.cpp
attempting to compile firmware
Compile failed. Exiting.

Now in my butte_proj folder I have this file and folder

main_ping.ino
blynk-library-spark-master

The main.ino includes this

#include “application.h”
#include “./blynk-library-spark-master/firmware/BlynkParticle.h”

So what do I have setup wrong?

chipMonk

I did say, that the includes need to be as if the file structure were flat.
So not

#include "application.h"
#include "./blynk-library-spark-master/firmware/BlynkParticle.h"

But

#include "application.h"
#include "BlynkParticle.h"

Also make sure, that there are no extra .ino files in that whole subtree (e.g. in an examples folder), otherwise the build farm can't decide which to build.

HI ScruffR,

When I have the main_ping.ino file beginning has these lines …

**#include “application.h”
**#include "BlynkParticle.h

particle compile photon main_ping.ino

Compiling code for photon

Including:
main_ping.ino
attempting to compile firmware
Compile failed. Exiting.
main_ping.cpp:2:37: fatal error: BlynkParticle.h: No such file or directory

                                 ^

compilation terminated.
make[1]: *** […/build/target/user/platform-6main_ping.o] Error 1
make: *** [user] Error 2

So it cannot find the header file.

chipMonk

Hi ScuffR,

Is this hierarchy correct?

in the butte_proj folder

main_ping.ino
firmware

Now firmware has these files from Git.

firmware/Blynk/BlynkParticle.h
firmware/Blynk/BlynkApi.h
firmware/Blynk/BlynkApiParticle.h
firmware/Blynk/BlynkConfig.h
firmware/Blynk/BlynkDebug.cpp
firmware/Blynk/BlynkDebug.h
firmware/Blynk/BlynkDetectDevice.h
firmware/Blynk/BlynkHandlers.cpp
firmware/Blynk/BlynkHandlers.h
firmware/Blynk/BlynkParam.h
firmware/Blynk/BlynkParticle.h
firmware/Blynk/BlynkProtocol.h
firmware/Blynk/BlynkProtocolDefs.h
firmware/Blynk/BlynkSimpleParticle.h
firmware/Blynk/BlynkUtility.h
firmware/Blynk/BlynkWidgets.h
firmware/Blynk/WidgetBridge.h
firmware/Blynk/WidgetLCD.h
firmware/Blynk/WidgetLED.h
firmware/Blynk/WidgetTerminal.h
firmware/Blynk/blynk.cpp
firmware/Blynk/blynk.h

In the main_ping.ino file I have …

#include "application.h"

#include "BlynkParticle.h"

is there a way to get a verbose output from the particle compiler?

chipMonk

do you have time for a TeamViewer session. I think in 5 min you can get me going.

chipMonk

Can you post your main_ping.ino so that I can have a play with building it?

I would rather not.

Is there a way to privately send to you?

chipMonks

Yes, you can send me a private message.
Just tap my avatar and click Message

As mentioned in the PM, this way it builds

//#include "BlynkParticle.h"  // no need for this, but for that
#include "blynk.h"

But as it turned out in our session, there must be an extra issue building on that particular OSX 10.9.5 machine - I’ll call for backup :wink: