Fatal error: BlynkEdgent.h: No such file or directory, Arduino, PlatformIO

Hi,

I am transitioning to Blynk 2.0. To start, I simply copied the Edgent example. PlatformIO and libraries are all lates versions. When I run it, I get “fatal error: BlynkEdgent.h: No such file or directory, Arduino, PlatformIO”. I have spent the last few hours troubleshooting this (also on blynk forums) with not much luck.

The only two libraries I use are Blynk and AccelStepper. Why do I get this error? It’s the same wether I use #include <BlynkEdgent.h> or #include “BlynkEdgent.h”.

Cheers,
Dimos

My platformio.ini loks like this:

[env:az-delivery-devkit-v4]
platform = espressif32
board = az-delivery-devkit-v4
framework = arduino
lib_deps =
   waspinator/AccelStepper@^1.61
   blynkkk/Blynk@^1.0.0

No sure if you figure out the solution to this error, but the BlynkEdgent is just for the ESP32. I expend some time trying to solve the same issue until I figure out where the problem was. I wish the developers would have clarified this in a better way.

UPDATE: If you load the example for the ESP32, it works. Once again, you MUST have the ESP32, any other microcontroller, good luck.

If you are using any other microcontroller, you need to follow this guide: Static AuthToken

1 Like

Thanks!

I am using the ESP32. This is my board: ESP32-DevKitC V4 Getting Started Guide — ESP-IDF Programming Guide v3.3 documentation

What have you done differently than me?

both are available

2021-06-14_130306

BlynkEdgent.h isn’t a library file within the Blynk 1.0.0 library, it’s a file within the example directory.
When you open one of the .ino files in the example in the Arduino IDE then all the other files in that folder will also load, as tabs at the top of the IDE.

In PIO, I don’t know what you need to do to get the code in this local file to be available to the main code, but that’s what you need to be focussing on.

Pete.

Peter… Thanks!

I copied the Edgenet Example folder to PlatformIO, renamed .ino to .cpp, added #include <Arduino.h> to it and it works!

Cheers,
Dimos

1 Like

he’s not peter. he’s pete

Sorry Pete :slight_smile:

Hey @Deemoss !

I just ran into this problem and I’m glad that you managed to solved it.
I dont quite understand what you did. Can you take me step be step please? Where did you find the folder, where did you move , etc.

Please and thank you !

Just open the relevant example from the Arduino IDE examples menu. It consists of several files.

I did find the Blyng Edgent folder. I just dont know where to put it so I can acces to it on PlatformIO.

it should go to the src. BTW, we will provide PIO projects out of the box soon!

I’ve added #include <Edgent_ESP32/BlynkEdgent.h> to my main.cpp and now I have the library, or whatever it is. But now I have a ton of errors from Console.h.

Yes, we do need more support for PlatformIO, because is a better IDE than ArduinoIDE.

I’m very confused here, cannot figure out exactly where the blynkedgent folder should go so that it finds all the related .h files. Also cannot find an example anywhere of using blynkedgent in pio. Hopefully someone can point me in the right direction as to where blynkedgent.h and its related .h files is placed, tried putting them individually in the include folder but keep getting errors for other .h files not found that I cannot find. According to the above the entire blynk.edgent example folder should go in the src folder that does not seem to be correct. Any help appreciated I’ve looked at all the posts here and cannot find a direct answer with regards to pio, or a link to the relavent PIO project that is coming soon back in '21.

How about GitHub - blynkkk/edgent-examples-pio: Blynk.Edgent template projects for PlatformIO ?

1 Like

Thank you appreciate the quick response and the link, helps a lot.

Rgds
Rod

1 Like

So to my next question Pete - I have the same issue now as all the edgent.h files are missing - how do I include them as a library add ?

Cheers

kev

Are you opening the example in the IDE, or picking-up the Edgent example from GitHub?

Pete.

I am opening them from the examples in the IDE it adds about 7 .h files etc. I seem to think( but honestly cant remember!) that there was a way they could be included as a library or something ?

For now I have added all the files into the same folder as the sketch and it works but its just not very tidy

Cheers

kev

That’s how it has to be with the Edgent example.

Is it just the Blynk.Air OTA functionality you need, or do you wnat dynamic provisioning of WiFi credentials too?

If you just want OTA then don’t bother with Edgent, just use the minimal Blynk.Air code…

Pete.