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

    M5StickCPlus doesn't program correctly

    Arduino
    2
    3
    5.8k
    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.
    • R
      ralphjy
      last edited by

      I'm having a real basic issue programming the M5StickCPlus. I am using the M5StickCPlus library but the only program that works correctly so far is the FactoryTest.ino.

      I tried using AXP192.ino and I got the following error:
      M5StickCPlus_AXP192:38:16: error: 'class AXP192' has no member named 'SetLDO3'
      M5.Axp.SetLDO3(false);

      I did #include <M5StickCPlus.h>

      I also tried I2C_Tester.ino and it runs if I don't have any external I2C devices, but if I add an I2C device in the Grove port - the Display no longer works.

      Is there something else that I need to do besides changing the library reference to use M5StickC programs with the Plus?

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

        Hello @ralphjy

        sorry for the inconvenience. It seems that only the factory test code has been adapted for M5StickCPlus as it is the only example in its example directory.

        All other examples are made for M5StickC and might need some adaption first to run properly on M5StickCPlus.

        I had a look at AXP192.ino and I2C_Tester.ino - here are the modifications so they run on M5StickCPlus:

        AXP192.ino

        • Comment out M5.Axp.SetLDO3(false); as it is not really needed (or adapt the missing function from M5StickC).
        • Comment out M5.Axp.SetChargeCurrent(CURRENT_100MA); as it is not needed - the charging current is already set in M5.begin().

        I2C_Tester.ino

        • Add M5.begin(); at the beginning of setup().
        • Change Wire.begin(); to Wire.begin(21, 22);

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 0
        • R
          ralphjy
          last edited by

          Thanks Felix,

          That helped. I guess from the documentation I thought that just adding the M5StickCPlus library would work. I have verified that some other programs do work (Display, TFT_Clock, PowerWake) with adjustments for the larger display size.

          The AXP192 and I2C_Tester programs work with your changes although I left Wire.begin() at default because I was checking the bus on the Grove port and that now is working.

          I did notice that on the Plus there is a small current draw on the battery (-0.5 mA) when I am running on USB power but it is 0mA on the StickC.

          Ralph

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