Skip to content

DHT22 Not Connecting Properly #1

@mgeiger

Description

@mgeiger

Have seen this twice now.

7406-Traceback (most recent call last):
7407:  File "sensors.py", line 87, in <module>
7408-    main()
7409:  File "sensors.py", line 75, in main
7410-    total_humidity += humidity
7411-TypeError: unsupported operand type(s) for +=: 'float' and 'NoneType'

Looks like the DHT22 Sensor is failing at some point. Then when the code tries to access the DHT, we get a None returned.

  • Should we reinitialize the DHT sensor?
  • Perhaps we should add a hardware switch to the power input on the line that can physically reset the device.
  • Is there a problem with the power input line? I am using the RPi 3.3V line, this might be the problem. There is a paralleled Cap (don't know value)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions