I'm using <TWI Scanner> example on nRF52 DK to find my sensor's address.
According to the sensor datasheet, the sensor's address is 0x21. However, <TWI Scanner> finds the address at 0x20.
Any idea, please?
I'm using <TWI Scanner> example on nRF52 DK to find my sensor's address.
According to the sensor datasheet, the sensor's address is 0x21. However, <TWI Scanner> finds the address at 0x20.
Any idea, please?
Hi,
StevenW807 said:Since I'm new to nRF52, does that mean it's impossible to get SDP31 measurements via nRF52 over TWI, pls?
No, it does not mean that. Almost any I2C device should be compatible with the nRF52, it is just that you need to write the driver for it yourself. That should be built on top of the TWI driver or some of the TWI libraries in the nRF5 SDK. It is generally the case that you have to do this yourself.
StevenW807 said:What modifications should I make to let nRF52 get SDP31 measurements over TWI, pls?
I have no experience with tee SDP31. But if you have a driver for the nRF51 which is fairly recent, then porting this to a new nRF5 SDK supporting the nRF52 should be quite simple. We still need to figure out the problem of basic I2C/TWI communication first, though. As mentioned I have ordered the devices and will have a look at that once I get it (it should be right around the corner now).
Problem Solved!
The code doesn't work due to the slave device and time delay issue. The sensor I'm using requires:
1) reset-->send continuous mode command-->read data (I didn't add reset command before)
2) meanwhile, for each read/write command, we must add a time delay (e.g. 5 ms) after the command
Thanks to everyone who helped me before! Cheers
Hello All, I am also facing the same issue so is it possible to provide the code snippet ?
Your early help will be greatly appreciated.