[Solved]- Installing Blynk library with Particle Dev (Atom)

I have successfully developed several Blynk apps for the Photon in Particle IDE. Now I am trying to migrate to the Particle Dev environment. I copied all the Blynk files from the IDE library to my project folder. The Bterminal() calls worked just fine. However, calling virtualRead(V0, x) once seemed to work, but the second call crashes the Photon with SOS 13.

I downloaded the latest Blynk library from gitHub, but the compiler indicates that one of the .h files is missing.

I seem to have hit a dead end. Is Particle Dev the way to go? Suggestions?
Thanks

In Dev you need to flatten your include statements.

// #include "Blynk/Blynk.h"
// should become
#include "Blynk.h" 
// irrespective of the actual path

About the stack overflow/usage fault SOS+13 what system version were you targetin with Build? Dev builds against 0.5.3.

1 Like

Good point about the file reference. I double checked and the Blynk file WidgetGPS.h is not in the download. Github shows this version is from 8 days ago. Will have to get back to you on the version number.

If I comment out
#include WidgetGPS.h
I get an error for a missing constant definition, presumably defined in that file. Am I doing something wrong, such as downloading the wrong library, or is the problem in the library?

Solved the problem by going back one version folder in gitHub.
The Photon crashing was solved by converting variables to String() in the virtualRead call.

float myVar = 3.145;
virtualRead(V9, myVar); // Compiles, but crashes the Photon the second time it is called.
virtualRead(V9, String(myVar)); // Works

A local Makerspace proved its value today. Many minds lifting together.

2 Likes

Good to hear you were able to solve your issue. Thanks @ScruffR for the help!