Trying to find the address of an I2C device

I recently raised the question of how to find the address of an I2C device and was told that one should be able to find it in the data sheet or in some cases to assign it oneself.

I have searched the data sheet of the DTH11 temp and humidity sensor and I cant find any reference to an address. Is it possible to quiz the device and get the address that way or am I just too dim to see it on the datasheet? Or if I have to assign it could someone point me to where the process is explained? I have searched numerous websites and not found any reference to assigning an address for an I2C device.

I have just watched Jeremy Blum Arduino Tutorial 7 which covers I2C and he uses address 72 for his particular device but does not mention where he found it or how he assigned that number.

As always, any help will be really appreciated.


Cut and past the code from here and upload it to your arduino with the DTH11 plugged in.

Thank you - that looks like just the thing I need.

Is the DHT11 an I2C device ?

UKHeliBob: Is the DHT11 an I2C device ?

i dont think so here is what i found

  1. Communication Process: Serial Interface (Single-Wire Two-Way) Single-bus data format is used for communication and synchronization between MCU and DHT11 sensor. One communication process is about 4ms. Data consists of decimal and integral parts. A complete data transmission is 40bit, and the sensor sends higher data bit first. Data format: 8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit decimal T data + 8bit check sum. If the data transmission is right, the check-sum should be the last 8bit of "8bit integral RH data + 8bit decimal RH data + 8bit integral T data + 8bit decimal T data".

Good luck Laurence !

Grab a suitable library from this tutorial Works on my DHT22 okay.

Thank you folks. I'm not sure now why I came to believe that the DHT11 is an I2C device. I ran the I2C scanner program on it and got an address back but it changed each time I ran the scanner. However, I do have a couple of I2C devices and all this is part of the learning curve, I guess. Tonight I am not going to stop until I get a temperatue and RH value .......

I am always amazed at teh speed of response on this forum and peoples readiness to give freely of their time and expertise. I, and many others I suspect, would have consigned their Arduinos to the bottom drawer without this extraordinary technical resource.