DHT11 Humidity Sensor

DHT11 Humidity SensorRequires 4.7k Resistor

I went for a plane unmounted version

http://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging

I've had lots of issues reading the humidity which is why the code is so long.  It takes a parameter HumidyPin which is the pin the sensor is attached to.  I now have 2 sensors attached to the system hence why it's a parameter.  It's hard coded for a type 11 sensor

The code uses the Adafruit humidity application

def pdshumidity(HumidityPin):
    if debug:
        print("Reading Humidity")
    LoopCount=0
    if debug:
        print('Trying Humidity = loop count ' + str(LoopCount))
        print("          Starting try for Humidity")
    output = subprocess.check_output(["/home/pi/pds/Adafruit_DHT", "11", str(HumidityPin)]);
    if debug:
        print("          Finished trying Hunmidity")

    matches = re.search("Hum =\s+([0-9.]+)", output)

    if debug:
        print("          Trying to find matches")

    while (not matches):
        output = subprocess.check_output(["/home/pi/pds/Adafruit_DHT", "11", str(HumidityPin)]);
        matches = re.search("Hum =\s+([0-9.]+)", output)
        LoopCount = LoopCount+1
        if debug:
            print('     Humidity loop count ' + str(LoopCount))
        if (LoopCount > 1):
            if debug:
                print('     Humidity sleeping due to failure ' + str(LoopCount))
            time.sleep(10)
        if (LoopCount > 20):
            humidity = 0
            matches = 1
    humidity = float(matches.group(1))
    if debug:
        print("          Humidity check finished")

    return humidity
DHT11 Temperature and Relative Humidity Sensor Module for arduino
DHT11 Temperature and Relative Humidity Sensor Module for arduino $1.99
End Date: Sunday Apr-19-2020 6:54:01 PDT
Buy It Now for only: $1.99
1X DHT11 Temperature and Relative Humidity Sensor Module for arduino
1X DHT11 Temperature and Relative Humidity Sensor Module for arduino $2.95
End Date: Friday May-1-2020 9:45:20 PDT
Buy It Now for only: $2.95
5X DHT11 Temperature and Relative Humidity Sensor Module for arduino
5X DHT11 Temperature and Relative Humidity Sensor Module for arduino $8.75
End Date: Wednesday Apr-15-2020 22:22:12 PDT
Buy It Now for only: $8.75
DHT11 Temperature and Relative Humidity Sensor Module for arduino with cable
DHT11 Temperature and Relative Humidity Sensor Module for arduino with cable $0.99
End Date: Saturday Apr-11-2020 8:50:10 PDT
Buy It Now for only: $0.99
DHT11 Temperature and Relative Humidity Sensor Module for arduino
DHT11 Temperature and Relative Humidity Sensor Module for arduino $1.08
End Date: Saturday Apr-25-2020 19:38:08 PDT
Buy It Now for only: $1.08
2PCS DHT11 Temperature Relative Humidity Sensor Module for arduino with cable
2PCS DHT11 Temperature  Relative Humidity Sensor Module for arduino with cable $4.99
End Date: Saturday Apr-18-2020 6:52:02 PDT
Buy It Now for only: $4.99
USA Stock DHT11 Temperature and Relative Humidity Sensor Module for arduino
USA Stock DHT11 Temperature and Relative Humidity Sensor Module for arduino $3.99
End Date: Thursday Apr-9-2020 1:45:48 PDT
Buy It Now for only: $3.99
DHT11 Temperature Humidity Sensor Module Digital Humidity Sensor w Dupont Wires
DHT11 Temperature Humidity Sensor Module Digital Humidity Sensor w Dupont Wires $3.60
End Date: Friday Apr-10-2020 6:17:11 PDT
Buy It Now for only: $3.60
1PCS Arduino DHT11 Temperature and Relative Humidity Sensor Module New
1PCS Arduino DHT11 Temperature and Relative Humidity Sensor Module New $1.14
End Date: Friday Apr-24-2020 0:25:35 PDT
Buy It Now for only: $1.14
Temperature and Relative Humidity Sensor DHT11 Module with Cable
Temperature and Relative Humidity Sensor DHT11 Module with Cable $3.79
End Date: Sunday Apr-5-2020 10:12:08 PDT
Buy It Now for only: $3.79

« Previous12345...910

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>