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

    How to get Device infos from m5stack Devices

    General
    8
    23
    53.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.
    • M
      Medy @m5stack
      last edited by Medy

      @m5stack I tried the

      import deviceCfg
      deviceCfg.get_board_name() 
      

      it throws an error ....

      Traceback (most recent call last):
      
        File "<stdin>", line 1, in <module>
      
        File "deviceCfg.py", line 270, in get_board_name
      
      TypeError: string indices must be integers, not str
      

      I tested all the other functions of deviceCfg and they all work ...
      but the one I asked you to add does not....

      hanks for implementing it .. but it doesnt work ;)

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

        Hello @Medy

        which M5Stack device did you try?

        I've just tested all of my M5Stack devices using UIFlow 1.8.7 and below code successfully (except M5StampPico which returns an incorrect name).

        import deviceCfg
        print(deviceCfg.get_board_name())
        

        Results for various M5Stack devices running UIFlow 1.8.7 firmware:

        M5Stack Gray : core
        M5Core2      : Core2
        M5StickC     : StickC
        M5StickCPlus : StickC-Plus
        M5CoreInk    : CoreInk
        M5Paper      : paper
        M5Atom       : Atom
        M5StampPico  : Atom
        

        Thanks
        Felix

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

        M 1 Reply Last reply Reply Quote 0
        • M
          Medy @felmue
          last edited by

          @felmue I tried the core gray

          guess I will try again and report back if it works.

          Ideally the the new m5 stamps will works as well with coming updates ?

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