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

    UiFLOW. I2C Programing

    UIFlow
    5
    8
    8.9k
    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.
    • T
      timtimw
      last edited by

      Hello, any helpful info on working with I2C ? Trying to interface an ADC1115 to core2 and
      not clear on start stop, acknowledge bits.. Working from T.I. datasheet. Tying to write
      directly to address pointer, configuration register, with I2C read/write data instruction. Thanks for any help

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

        Hello @timtimw

        the I2C functions in UIFlow will take care of start, stop and ack bits for you. Have you tried to use the I2C functions provided under Hardwares - I2C?

        I suggest you start with an I2C scan to see if the ADC1115 is found and the wiring is correct.

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 1
        • ajb2k3A
          ajb2k3 @timtimw
          last edited by

          @timtimw said in UiFLOW. I2C Programing:

          Hello, any helpful info on working with I2C ? Trying to interface an ADC1115 to core2 and
          not clear on start stop, acknowledge bits.. Working from T.I. datasheet. Tying to write
          directly to address pointer, configuration register, with I2C read/write data instruction. Thanks for any help

          As Felmue has said, the start/stop/ACK are all handled behind the scenes all you need to do is use the blocks to read or write to the registers and decipher the data sent.

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          1 Reply Last reply Reply Quote 1
          • T
            timtimw
            last edited by

            Yup thanks,
            Works like a charm now with I2C write and read direct to registers. Easy after some hit and miss
            with data encoding. R/W 'short' with 'big' decode/ encode was the magic.
            Thanks for the help
            .

            ArnoA bschwahnB 2 Replies Last reply Reply Quote 1
            • ArnoA
              Arno @timtimw
              last edited by

              @timtimw Can you provide a screenshot, I tried to connect other I2C modules without success.
              Thanks in advance for sharing

              I only use Uiflow ! with M5STACK Gray, RED, CORE2, ATOM, ATOM Lite,M5Paper, M5Tough, ATOM Display, M5 Stamp pico and more Unit...

              1 Reply Last reply Reply Quote 0
              • bschwahnB
                bschwahn @timtimw
                last edited by

                @timtimw
                That is awesome that you were able to get I2C to work with the ADC1115. I would be very interested in your ADC project at many of us discovered the built-in ADC has a few challenges. Again as Arno added could you please post /share your code? I am trying to use DS18B20 with UIFlow but am having some difficulties.

                Thanks Brian

                What doesn't kill me makes me stronger.

                ArnoA 1 Reply Last reply Reply Quote 0
                • ArnoA
                  Arno @bschwahn
                  last edited by Arno

                  @bschwahn ds18b20 very easy to use with https://github.com/stonatm/UiFlow-custom-blocks/tree/master/ds18b20

                  I only use Uiflow ! with M5STACK Gray, RED, CORE2, ATOM, ATOM Lite,M5Paper, M5Tough, ATOM Display, M5 Stamp pico and more Unit...

                  bschwahnB 1 Reply Last reply Reply Quote 0
                  • bschwahnB
                    bschwahn @Arno
                    last edited by

                    @arno

                    Thanks Arno for the push in the right direction. I was able to get this to work on my Core 2 EXCEPT using G21 or G22.

                    I will write up a tutorial on try to find a way to post/share.

                    Thanks again Arno!

                    What doesn't kill me makes me stronger.

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