Code: Select all
i2c = pyb.I2C(1, pyb.I2C.SLAVE, addr = 0x43)
What step I missing ?
It can be used, but it requires attention to detail because the slave will only respond to the master if it's in read mode. So you need to design a protocol to ensure the master only tries to access the slave when the slave is ready to receive. That is what the driver that I mentioned does.
The machine module is designed to support a wide range of physical hardware; most platforms don't support slave mode. So machine does not offer it. Pyboard hardware does support it, hence MicroPython support is in the Pyboard specific pyb.