Today I tried connecting it to OpenMV. Here are my results:
- First of all, the labels at https://openmv.io/docs/openmv/quickref.html are wrong -- the SDA and SCL are swapped. SCL is PB11 and SDA is PB10.
- Scanning initially works. Just after connecting the OpenMV board and initializing the I2C class, I can do scan() and it shows my device.
- Writing to the device doesn't seem to do anything (at least my device doesn't receive correct data).
- As soon as I try writing, either with send() or mem_write(), scan() only returns an empty list, and any further writes result in OSError: 16.
- That continues through soft-reset (ctrl+d) and reset of my device. Only switching the OpenMV off and on again resets it to the initial state.
Code: Select all
>>> import pyb >>> import ustruct >>> bus = pyb.I2C(2, pyb.I2C.MASTER) >>> bus.scan()  >>> bus.mem_write(ustruct.pack("<H", 1500), 9, 0) >>> bus.scan()  >>> bus.mem_write(ustruct.pack("<H", 1500), 9, 0) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: 16 >>> Micro Python v1.4.4-125-g07c8f99 on 2015-08-18; OPENMV2 with STM32F427 Type "help()" for more information. >>> import pyb >>> bus = pyb.I2C(2, pyb.I2C.MASTER) >>> bus.scan()