Hi, I made a circuit to use another peripheral, so Would you check that this circuit is correct??
and if correct,Could you explain the role of mbl_mw_i2c_get_data_signal and the role of parameter id?
I don't know what value do i input into parameter id.
Comments
Read the documentation:
https://mbientlab.com/cppdocs/0/i2c.html
Have you tested this circuit? There's no point in asking for feedback if you don't even know if it works or not.
As long as it works on a 3v power line and it's i2c compatible, I don't see why it wouldn't work in theory.
Yes, this circuit was tested using osciloscope and then, I identified that when I tried to communicate MMR with AD7745, the SDA, SCL signal occurred.
I think that i misused this code. Could you give me another code except this example (https://mbientlab.com/cppdocs/0/i2c.html) ??
I think that i entered a wrong register address and device address
Is it working now that you have fixed the i2c settings?
No....
If I try to control the LED of MMR, it was fine.. but i2c communication has a problem..
This is my code. is there any problem in code??
It could be your device does not follow standard I2C protocol. Verify with your device's spec sheet on how to read a register value
I think so! So, libmetawear.mbl_mw_datasignal_subscribe and libmetawear.mbl_mw_datasignal_read_with parameters can implement i2c communication ?
This picture is the write and read sequence
I really wonder that subscribe and read with parameter function can send slave address, sub address, slave address as read sequence.
So I mean that if I use these two functions, I can send the SLAVE ADDR, SUB ADDR, SLAVE ADDR to SLAVE DEVICE.
Hi, Eric!
I solved the above problem and your advice was perfectly right!
but, there is another problem in I2C Communication
MMR communicates with AD7745 and AD7745 create the data per 11.0ms
So, I want to set the i2c reading speed of MMR in code as same as the speed that AD7745 create the data
Now, I'm using the sleep(0.01) in my code but this way is not correct
So, Could you give me any advice ?
Thanks,
Wongi
https://mbientlab.com/cppdocs/0/timer.html
https://github.com/mbientlab/MetaWear-SDK-Python/blob/master/examples/log_temp.py#L23