Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. TakekazuKATO
    T
    • Continue chat with TakekazuKATO
    • Start new chat with TakekazuKATO
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    TakekazuKATO

    @TakekazuKATO

    0
    Reputation
    2
    Posts
    89
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    TakekazuKATO Follow

    Posts made by TakekazuKATO

    • RE: I2C slave mode doesn't work for UnitV Stick

      Is this problem already solved?

      It seems to be a mistake in the sample program.

      Although, the variable 'count' in the function i2c_transmit() should be global, it is interpreted as local.

      I modified the function i2c_on_transmit() as follows:

      def i2c_on_transmit ():
          global count
          count = count + 1
          print ("on_transmit, send:", count)
          return count
      

      Then, it worked well.

      posted in Units
      T
      TakekazuKATO
    • Re: I2C slave mode doesn't work for UnitV Stick

      Is this problem already solved?

      I encountered the same problem and found a solution.
      I think this is a mistake in the sample program.

      Although the variable `count' in the function i2c_on_transmit must be global it is interpreted as a local variable.

      I have modified the i2c_on_transmit() as follows.

      def i2c_on_transmit()
        global count
        count = count + 1
        print ("on_transmit, send:", count)
        return count
      

      Then, it worked well.

      posted in Units
      T
      TakekazuKATO