Electron not working with blynk app

not sure if this is a blynk problem or a particle problem. When I was using particle 0.5.1-rc.1 pre release my electron was working with blynk. After it was working it was taken out of service for about a month. After trying to hook everything back up and make code adjustments the 0.5.1-rc.1 is no longer an option on the build IDE so I had to update my firmware to 5.1 After I updated 5.1 and I found blynk also had some server issues and migrated their servers and I had to update my blynk library. So after updating particle firmware to 5.1 and blynk firmware to 3.5 and writing some new code my blynk app that was working before on 0.5.1-rc.1 with blynks older firmware will not work. The error I get back from the serial monitor is invalid auth token. I know the auth token is correct as it has been verifed several times and I used the exact same code and firmware with only changed pinouts and I can connect to blynk with a photon. I have tried downgrading firmware back to 0.5.1-rc.1 but it will not work as the build IDE wont let me select 0.5.1-rc.1 as an option for building any longer it only lets me use 5.1 or 5.0 and I can not use 5.0 because that is the firmware with the original electron problem that needed fixed to begin with. I have already been working with blynk and they have been unable to find the problem. Basically I don’t know if this is a blynk library issue or a particle firmware issue as it was running on a previous version of both. Any help would be greatly appreciated I’ve been banging my head on this for a week :weary:

I don’t know if this still works, but you could give this a shot

particle compile electron . --target 0.5.1-rc.1

Nope, I tried and it failed :weary:

C:\Particle\test>particle compile electron . --target 0.5.1-rc.1

Compiling code for electron
Compile failed. Exiting.
Invalid build target version.
Valid targets:

here is the relevant part of my code if it helps in any way

#define BLYNK_DEBUG // Optional, this enables lots of prints
#define BLYNK_PRINT Serial

// This #include statement was automatically added by the Particle IDE.
#include "blynk/blynk.h"

STARTUP(cellular_credentials_set("apn.konekt.io", "", "", NULL)); //uncomment for cellular

char auth[] = "xxxxxxxx";

int power_input = C0;
int press_input = D4;
int pump_output = D0;
int press_analog = A0;
int pressure;
int moisture;
int temp;
bool manual_on = false;
bool auto_on = false;
unsigned long start;
unsigned long start5;
unsigned long start10;
unsigned long start20;
unsigned long start30;
unsigned long timeroll = 5000;

void setup() {
Serial1.begin (9600);
digitalWrite (pump_output,LOW);

void loop() {

pressure = analogRead(press_analog);
pressure = map(pressure, 369, 3599, 0, 100);

if (timeroll > millis()){
    start = millis();
    start5 = start;
    start10 = start;
    start20 = start;
    start30 = start;

(more code)

I have also tried two separate electrons and two separate cellular carriers. Both I can get to connect to cellular but will not connect to blynk

@ScruffR I made a clone of the blynk library and changed some of the code and re added it to my program and it is running smoothly. Not a particle problem. Thank you very much for your help.

1 Like