I think "i2c_read()" can only be used by I2C master device to read data from slave device.
Is this answer correct?
I think "i2c_read()" can only be used by I2C master device to read data from slave device.
Is this answer correct?
Hello,
I agree that it is a bit unintuitive, but you can use this API as an I2C slave to read data from the I2C master as well.
Best regards,
Edvin
In the param description of "i2c_read", the 4th param "addr" is the target i2c device address.
Only a slave device has i2c address.
If a slave device uses "i2c_read" to read, what address should we use?
In the param description of "i2c_read", the 4th param "addr" is the target i2c device address.
Only a slave device has i2c address.
If a slave device uses "i2c_read" to read, what address should we use?
That's a good point. I just thought it would since the description didn't specify I2C master, but I see that it uses the "controller" and "device" terminology.
I contacted the devacademy team, and I believe they updated the question already.
Thank you for reporting!
Best regards,
Edvin