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”.
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
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.
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.
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.
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.
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