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

    touch stopped working

    Core 2
    4
    29
    46.3k
    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.
    • A
      albertlt @felmue
      last edited by

      @felmue Thanks a lot for pointing out the static on the button. So I am planning to place a couple buttons on the screen and put all the codes in the tapEvent() method and filter by e.objName(). Is it the correct way to do it? or is there alternative similar to: M5.BtnA.wasPressed() ? Also, how do I clear the static button when changing screen to preserve ram?

      Yes, I also realized Wire.requestFrom(); is causing the block. Is there any way to get around this issue? This make the device's UI not very user friendly when i2c is used and without i2c, this device is not very useful as a lot of modules depend on i2c :(

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

        Hello @albertlt

        the documentation here should answer most of your questions. If you define your buttons outside a function then you can use btn1.wasPressed() like this:

            #include <M5Core2.h>
            Button myButton(10, 10, 200, 100, false, "I'm a button !", {BLACK, WHITE, WHITE});
            void setup() {
              M5.begin();
            }
            void loop() {
              M5.update();
              if (myButton.wasPressed()) Serial.print("* ");
            }
        

        As for I2C - as I wrote in my last post, check out tasks.

        Thanks
        Felix

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

        A 1 Reply Last reply Reply Quote 0
        • W4GHVW
          W4GHV @felmue
          last edited by

          @felmue Thanks reply. I see you are busy helping lots of folks.
          I think you nailed the problem.
          I need the AWS.bin file. It's not in the burner FW subdir.

          I looked everywhere on the web and only found the source. Can you send it to me?

          On + side, I got Thonny, blink, & hello going on a new ESP-WROOM-32 ESP32S!

          I'm hoping the.bin file is the solution.
          Bo

          73, Bo W4GHV since '54

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

            Hello @W4GHV

            have you downloaded the Core2_For_AWS from within M5Burner?

            0_1651761398226_Core2_For_AWS_FW_20220505.png

            In my Linux setup Core2_For_AWS-v0.0.1.bin is in this path M5Burner_Linux/packages/fw/core/.

            Thanks
            Felix

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

            1 Reply Last reply Reply Quote 0
            • W4GHVW
              W4GHV @felmue
              last edited by

              @felmue. The easy loader app loads the AWS firmware. And that doesn't help the touch function.

              Stubborn ( or dumb) here, I'll return these 2 and buy the non-AWS version.
              Bo

              73, Bo W4GHV since '54

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

                Hello @W4GHV

                ok, I hope you have better luck with the non-AWS version.

                Thanks
                Felix

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

                1 Reply Last reply Reply Quote 0
                • A
                  albertlt @felmue
                  last edited by

                  @felmue okay will do. thanks a lot felmue for your help. have a nice day

                  1 Reply Last reply Reply Quote 0
                  • A
                    albertlt
                    last edited by albertlt

                    Hi @felmue. I have a quick question. I tried to encapsulate the GUI function in a class named M5GUI. I moved the tapEvent into M5GUI.h as follow:

                    private:
                        void tapEvent(Event& e);
                    

                    Then in M5GUI.cpp:

                    void M5GUI::begin(){
                      M5.Buttons.addHandler(tapEvent, E_RELEASE);
                    }
                    
                    void M5GUI::tapEvent(Event& e){
                      Serial.print("Button: ");
                      Serial.println(e.objName());
                    }
                    

                    The M5.Buttons.addHandler(tapEvent, E_RELEASE); is giving me this error:

                    argument of type "void (M5GUI::)(Event &e)" is incompatible with parameter of type "void ()(Event &)"

                    How do I integrate that event handler function properly into class method?

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

                      Hello @albertlt

                      sorry, I cannot help you with that. I am not very well versed about how to use classes.

                      Thanks
                      Felix

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

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        albertlt @felmue
                        last edited by

                        @felmue no problem. thanks for your help and time :)

                        1 Reply Last reply Reply Quote 0
                        • C
                          CodeGrue
                          last edited by CodeGrue

                          I had the same thing happen with the AWS version. Touch was working initially with the Core2_For_AWS firmware. However, I burned the Core2_Tools firmware. When this booted it said "Updating touch firmware" and then the screen was unresponsive with any other firmware burns. Somehow this disabled the touch capability. I tested this on two AWS units and it happened to both.

                          I feel like it may be a screen calibration issue. There is this note from this page (https://shop.m5stack.com/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit):

                          "Some of the screen edges will have touch non-linearity problem, you can try to use M5Tool to upgrade the screen firmware to solve this problem."

                          And looking at the source code for the referenced M5Tool, it appears it performs a procedure to update the touch firmware to version 17. This may actually be a downgrade for the AWS unit, maybe not, but in any case I'm pretty sure this broke it.

                          -- void ft6336_fw_updater(void); // M5Core2 TouchPanel updater

                          I logged an issue with the M5Tool github project. Looking at the history this is not the first time this firmware update broke one of the models.

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

                            Hello @CodeGrue

                            thank you for letting the community know.

                            I've checked the touch firmware version (w/o actually updating it) of two of my M5Core2s and both report fw v0.0.0.

                            Do you remember if the touch firmware update actually ran through successfully? I wonder if maybe the firmware isn't broken, but the update process failed.

                            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