I2C Device ID

I am a beginner when it comes to coding and all the nuances that come with the trade.

I have been trying to acquire a Device ID from a pressure sensor so I can plug and play with these devices. I would like to be able to have a device be plugged in and it be read. I want the pressure, Device ID, and what kind of pressure get written to a LCD. I can get the device to give me the pressure with a formula written in the datasheet. This is the data sheet I am using(http://www.nxp.com/documents/user_manual/UM10204.pdf) on page 21, to try and get the device ID to be spit out. I cannot seem to understand what it is saying. I have tried to acquire some code found on here and put them together, but it seems that this is out of my depth. I would love some help to get this to work.

The_one_that_works2.ino (3.51 KB)

Note that the document says:

he Device ID field (see Figure 20) is an optional 3-byte read-only (24 bits) word

Which pressure sensor are you using and why do you need the device ID? The sensor may not even have a device ID.


I would like to use the I2C port of the arduino to scan these pressure sensors and give me the data stored in them. I am using (http://www.meas-spec.com/downloads/MS4525DO.pdf.) The Device ID is so I can differentiate between the sensors I will be scanning.

As far as I can see, there is no device ID. On page 14 of the PDF you linked to, it shows that you can select from a few different I2C addresses based on the part number. If you only use a few of these devices that might be a way to differentiate them.

Also, the PDF you linked refers to this PDF: http://meas-spec.com/downloads/Interfacing_to_MEAS_Digital_Pressure_Modules.pdf which describes interfacing to their I2C and SPI devices and there is no mention of a device ID. If you want to have multiple devices with the same I2C address on the bus at the same time you'd have to use an I2C multiplexer (or whatever they're called).


Thank you. I was confused by the other document telling me about a Device ID. I have been receiving nonsense when I try to ping it the same way as the other sensors for the Device ID. I hope that I can get another device that actually has one listed. Maybe I couldn't get the device ID because there is not one integrated into the chip. That would be nice. Thanks again for taking the time to review that. =D