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.