🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5stick from PlatformIO

    Scheduled Pinned Locked Moved Arduino
    4 Posts 3 Posters 10.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ariane98A Offline
      Ariane98
      last edited by Ariane98

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

      1 Reply Last reply Reply Quote 0
      • N Offline
        nsfilho
        last edited by

        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
        
        1 Reply Last reply Reply Quote 0
        • hagueH Offline
          hague
          last edited by

          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/M5StickC

          Then you can include the header file like this:
          #include "M5StickC.h"

          Not exactly the most beautiful solution, but it works...

          N 1 Reply Last reply Reply Quote 0
          • N Offline
            nsfilho @hague
            last edited by

            @hague I could be wrong, but I believe if you use as lib_deps is 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 - *.o files).

            Other interesting point is to add more libraries to project. But again, this is IMHO about the way to use PlatformIO.

            1 Reply Last reply Reply Quote 0

            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
            • First post
              Last post