0

DHT-22 Serial Number
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

DHT-22 Serial Number

by jeffrussell37 on Fri Dec 04, 2020 12:27 pm

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.

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

Re: DHT-22 Serial Number

by franklin97355 on Fri Dec 04, 2020 1:02 pm

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-sensing-on-raspberry-pi-with-gdocs-logging/overview

franklin97355
 
Posts: 21964
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: DHT-22 Serial Number

by jeffrussell37 on Fri Dec 04, 2020 8:15 pm

@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?

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

Please be positive and constructive with your questions and comments.