Simple setup of photon and blynk

I seem to be stumbling around in complete darkness here because I can’t seem to figure out how to get a blynk project connected to a particle photon.

I have put the blynk library in my project and put the following lines in my code:

char auth[] = “xxxxx”; //replaced the xxxxx with the code from the blynk project… This line is before the setup section

//inside the setup section:
Blynk.begin(auth);

//and then inside the loop i have a couple of these:
Blynk.virtualWrite(V0, HIGH);

Blynk.virtualWrite(V0, LOW);

I can compile the code and flash it to the photon without a problem (message at bottom says it compiled and flashed)

On the blynk project I have an LED with the input as V0 (I have tried “pin” as well)

When I hit the run triangle in blynk i get a message that says, “Your Particle Core is not in network”. in the project settings I have the hardware model set to “particle core” because I could not find “particle photon” so i figured other people must be using the “core” as the same setup as the “photon”…

In any event any glimmer of guidance is greatly appreciated!

Thanks,
Eric

Did you try using an example provided with Particle library? https://github.com/vshymanskyy/blynk-library-spark/blob/master/firmware/examples/SparkCore/SparkCore.ino

Vhymanskyy -

Thanks for the link. I had seen all the files that came with the library, but I didn’t see the .ino file in the middle of them all. I thought they were all part of the library.

I found the sample and with playing around a bit more I have been able to get it to run :). For others following (or myself in the future…) a couple of things that made a difference… You need to have a “Blynk.run();” in the code to make it work, and it is case sensitive (more used to visual studio and things are a bit more sloppy there…). Also the LED widget in blynk needs a value above a threshold that I am guessing is probably around 2048 (haven’t tracked it down exactly). Setting it HIGH and LOW sets it to 1 and 0 which isn’t enough. When I set it to 4000 it worked :). I also used the terminal widget to help troubleshoot and it helped alot!

Thanks again for the help!!!

Eric