M5stick from PlatformIO
-
Hi
Having problems with UIFlow, I tried PlatformIO to program the M5stick.
I was able to upload the "arduino-wifiscan" but then I wanted to print Wifi infos on the screen. I thought I had to #include <M5StickC.h> but it "gets red" and says I should update includePath
Why/how do I do that ?
I tried "pio lib install "M5StickC" and no more red alert...for a while, but then error again about includePath
If someone had a simple step by step setup for the M5StickC it would help me a lot... -
You need to change your lib_deps in
platformio.ini, as the sample bellow:[env:m5stick-c] platform = espressif32 board = m5stick-c framework = arduino lib_deps = M5StickC monitor_speed = 115200 -
Another simple solution is to download the library and put all files from the /src directory directly it in the /src directory from your PlatformIO project.
Link to the library:
https://github.com/m5stack/M5StickCThen you can include the header file like this:
#include "M5StickC.h"Not exactly the most beautiful solution, but it works...
-
@hague I could be wrong, but I believe if you use as
lib_depsis a better solution, because the PlatformIO can update automatically the library in the future. Not only that, your code build more faster (because the library use a shared objects -*.ofiles).Other interesting point is to add more libraries to project. But again, this is IMHO about the way to use PlatformIO.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login