M5StickCPlus doesn't program correctly

  • 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'

    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?

  • 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:


    • 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().


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


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