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

    MiniJoyC support in UIFlow2

    UiFlow 2.0
    2
    12
    1.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.
    • lbuqueL
      lbuque @Rango
      last edited by

      @Rango What problem did you encounter and what did you try?

      R 2 Replies Last reply Reply Quote 0
      • R
        Rango @lbuque
        last edited by Rango

        @lbuque get X and Y do not return values. Button works ok. Get fw version does not work either. I'll post my code later. But there aren't many options in the API to try. Even example code does not work.

        1 Reply Last reply Reply Quote 0
        • R
          Rango @lbuque
          last edited by

          @lbuque
          This UIFlow1 code works
          UIFlow1.jpg

          This UIFlow2 code does not work. X and Y are 0 and Firmware changes with button push
          UIFlow2.jpg

          I get timeouts when trying to read I2C directly
          UIFlow2-1.jpg

          Any help would be appreciated

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

            I found if you scan the bus before doing any other read or write, things start to work with direct I2C calls, somewhat.

            I can only get RAW values, reading from memory address 0x10 or 0x20 always return zeros.

            Also, setting Calibration values doesn't seem to have an effect on the RAW values

            Here is the code I have working to read RAW values and FW version as well as set RGB LED colors
            UIFlow1.jpg
            UIFlow2.jpg

            It would still be nice if the actual library was working as expected

            1 Reply Last reply Reply Quote 0
            • lbuqueL
              lbuque
              last edited by

              I didn't find this problem. It is working properly.80e50da9-4755-4d8b-85d4-d71420f5216d-image.png

              R 2 Replies Last reply Reply Quote 1
              • R
                Rango @lbuque
                last edited by

                @lbuque This test code does not work for me.
                X always returns 0 and Y always returns -1
                The values never change.

                Does this mean I have a defective MiniJoyC?
                Even if everything works in UIFlow 1?

                What version of UIFlow2 are you using?

                R 1 Reply Last reply Reply Quote 0
                • R
                  Rango @Rango
                  last edited by Rango

                  I figured it out, the calibration values were all off.
                  I reset them to 0x0000 min, 0x1000 max, 0x0800 center and everything is working!

                  What a PITA.

                  @lbuque , Thanks for your reply. It made me dig deaper to find out what the issue was.

                  1 Reply Last reply Reply Quote 0
                  • R
                    Rango @lbuque
                    last edited by

                    @lbuque Would you mind running this code and let me know what the calibration values are for your MiniJoyC?

                    https://uiflow2.m5stack.com/?pkey=4b2548481e1644aa8a0ccc88ca8f7859

                    I want to set mine to working values.

                    It would be much appreciated.

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

                      I have written a program to set the calibration values for others having the same issue where the MiniJoyC calibration seems to be off.

                      https://uiflow2.m5stack.com/?pkey=165277eeb4364ab9be0d843ede823559

                      lbuqueL 1 Reply Last reply Reply Quote 0
                      • lbuqueL
                        lbuque @Rango
                        last edited by

                        @Rango 我不明白你为什么需要关注校准值。校准值在出厂的时候已经经行校准,输出的adc值是使用校准值进行计算之后的结果。

                        R 1 Reply Last reply Reply Quote 0
                        • R
                          Rango @lbuque
                          last edited by

                          @lbuque for some reason, the values in my unit were way off when I received it and it did not work. Resetting the values got the unit to work. Not sure what corrupted the values.

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