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

    Got extio2 running on Core2?

    Core 2
    2
    4
    3.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.
    • F
      fly4fun
      last edited by

      Didn’t find examples for how to use extio2 on Core2? Anyone can help?

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @fly4fun

        try to modify the M5Stack example like this:
        replace:

        #include <M5Stack.h>
        M5.begin();
        while (!extio.begin(&Wire, 21, 22, 0x45)) {
        

        with:

        #include <M5Core2.h>
        M5.begin(true, false, true, true);
        while (!extio.begin(&Wire, 32, 33, 0x45)) {
        

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 1
        • F
          fly4fun
          last edited by

          Felix, you are a star! Now digital outputs and digital inputs are working. Only thing is, I always get returncode 1 back for all extio.x calls so not sure what this one left is?

          1 Reply Last reply Reply Quote 0
          • felmueF
            felmue
            last edited by felmue

            Hello @fly4fun

            thank you and thank you for reporting back. I am glad you got it working.

            @m5stack: Please check out this pull-request. Thank you.

            Most of those functions return true if successful (and false otherwise).

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            1 Reply Last reply Reply Quote 0
            • First post
              Last post