DHT-22 Serial Number

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jeffrussell37
 
Posts: 2
Joined: Fri Dec 04, 2020 12:24 pm

DHT-22 Serial Number

Post by jeffrussell37 »

Is there any means to programmatically retrieve the serial number of the DHT22 sensor? I am using two sensors attached to a raspberry pi, and I need to be differentiate the two readings.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: DHT-22 Serial Number

Post by Franklin97355 »

Acording to the technical info Although it uses a single-wire to send data it is not Dallas One Wire compatible! If you want multiple sensors, each one must have its own data pin More info on connecting is herehttps://learn.adafruit.com/dht-humidity ... g/overview

User avatar
jeffrussell37
 
Posts: 2
Joined: Fri Dec 04, 2020 12:24 pm

Re: DHT-22 Serial Number

Post by jeffrussell37 »

@franklin97355: Thank you for that information. I had already figured that part out prior to posting! :) I have each sensor on a different GPIO data pin. What I need is to know if I can determine the sensor serial number programmatically. I will be setting up several identical RPis with three of these sensors on each one. They are reporting the data to a remote database which presents the data via a web service running on the server. If I can retrieve the serial number programmatically, it will make differentiating the data much easier. Otherwise, I will have to put a unique number on them in some other manner in my scripts. Not necessarily a big deal, but will be a much more manual process than I was hoping for.

So, is there a way to get the sensor serial number through programming/scripting?

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”