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

    M5stick from PlatformIO

    Arduino
    3
    4
    9.2k
    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
      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
        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
          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
            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
            • First post
              Last post