Upgrading project with Blynk library 0.5.2 (form 0.3.3 )

Hi,

I am trying to recompile the Particle Photon project using Blynk 0.5.2 library instead of 0.3.3. I use Particle Desktop Ide and I can’t compile the project. There are a lot of errors like this:

“‘WidgetTerminal’ does not math name a type”
example code: WidgetTerminal terminal(V7);

“‘Blynk’ was not declared in this scope”
exaple code: Blynk.virtualWrite(V1, valInChar);

The begging of my program is below:

#include "Adafruit_BMP085.h"
#include "SFE_TSL2561.h"
#include "Blynk.h"
#include "SimpleTimer.h"
#include "HTU21D.h"
#include "spark-dallas-temperature.h"
#include "MQTT.h"

#define DS_RESOLUTION   12

#define MQTT_ID         "*****"
#define mqtt_user		"*****"
#define mqtt_password	"*****"
#define MQTT_TEMP        "Weather/temp"
#define MQTT_PRES       "Weather/pres"
#define MQTT_HUMI       "Weather/humi"
#define MQTT_DEW        "Weather/dew"
#define MQTT_LUX        "Weather/lux"
#define MQTT_IN_TOPIC   "WeatherIn"
#define IFTTT_EV    "WeatherSt_IFTTT"
#define MSR_DELAY 5              // 5000 ms

STARTUP(System.enableFeature(FEATURE_RETAINED_MEMORY));
//WiFi.setCredentials("My_Router", "mypasswordishuge");

Adafruit_BMP085     bmp;
SFE_TSL2561         tsl = SFE_TSL2561();
HTU21D              htu = HTU21D();

SimpleTimer         timer;
boolean             Flag_5sec;
boolean             Flag_1min;
boolean             Flag_1hour;

DallasTemperature   dallas(new OneWire(D2));
DeviceAddress       dallas_addr;

retained boolean gain = false;   				// Gain setting, 0 = X1, 1 = X16;
retained unsigned char integration = 0;         // 0, 1, 2, 3- manual
unsigned int ms;  								// Integration ("shutter") time in milliseconds
unsigned int data1;
unsigned int data2;

float	temp_bmp;
float	pres;
double	lux;
boolean	lux_good;
float   humi;
float   temp_htu;
float   temp_dallas;
float   dew_point;
float   temp;                               // temp from dallas or other devices

//String  PublStr;                            //String to store the sensor data; spark variable "result" to store sensor data string
const char *CELL_SEPARATOR = "|||";         // for Goggle speedshet

retained int16_t NumberOfResets;
String MyIPstring;

WidgetTerminal terminal(V7);

Best regards,
Peter.

I don’t know what kind of board you are using
try this

#include <BlynkSimpleEsp8266.h>

@Blynk_Coeur Particle photon is NOT an ESP8266 board! @celetron, Try Blynk 0.5.1 as I’m not sure if the latest has full support for particle already. Also: is it Blynk.h or blynk.h?
OK, I guess Blynk.h is the right one, but it might need the BlynkParticle.h anyway

sorry I can’t help you, I 'm using nodeMCU from LoLin
:wink:

Try forking the library used on the Particle Cloud IDE, I suppose they’ll have the latest there.

And accordingly to https://examples.blynk.cc/?board=Particle%20Photon&shield=Particle%20WiFi&example=GettingStarted%2FGetData the library is lower case blynk.h

Hi,

Thanks for quick respond.

I’ve tried this - I receive the same errors.

And accordingly to Blynk Example Browser the library is lower case blynk.h

I’ve tried Blynk.h and blynk.h. I’am sure there should be Blynk.h. In version 0.3.3 there was blynk.h.

Try Blynk 0.5.1 as I’m not sure if the latest has full support for particle already.

I will try.

Regards,

Hi,

It is something wrong with my project structure.
Can someone show me correct project (with blynk library) structure?

Best Regards,
Peter

OK. I solved the problem.

I created new project inside Particle Desktop Ide and import Blynk library (use --> copy - not add). Then I recreated the same project structure in my old project. And the last thing: include Blynk.h not BlynkParticle.h

Regards,