Module for DHT22 temperature/humidity sensor

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
honza.kurik
Posts: 2
Joined: Fri Aug 08, 2014 12:47 pm

Module for DHT22 temperature/humidity sensor

Post by honza.kurik » Fri Aug 08, 2014 12:51 pm

Hi,

I made a module for DHT22 temperature and humidity sensor.
For those who are interested, follow the link: https://github.com/kurik/uPython-DHT22

cooper
Posts: 23
Joined: Mon Oct 20, 2014 8:40 am

Re: Module for DHT22 temperature/humidity sensor

Post by cooper » Wed Nov 05, 2014 10:04 am

That's just what I needed, thanks!

Damien
Site Admin
Posts: 581
Joined: Mon Dec 09, 2013 5:02 pm

Re: Module for DHT22 temperature/humidity sensor

Post by Damien » Wed Nov 05, 2014 11:27 pm

Perhaps we should make a page linking to all the user-contributed drivers? Or, better still, merge them into micropython-lib (assuming they have a suitable license)?

honza.kurik
Posts: 2
Joined: Fri Aug 08, 2014 12:47 pm

Re: Module for DHT22 temperature/humidity sensor

Post by honza.kurik » Thu Nov 06, 2014 6:05 am


Turbinenreiter
Posts: 274
Joined: Sun May 04, 2014 8:54 am

Re: Module for DHT22 temperature/humidity sensor

Post by Turbinenreiter » Thu Nov 06, 2014 8:32 am

@damien

There is a page in the user forum, but having a repo would be nice. Maybe micropython-dev-lib? I kinda think it should be separated from the stdlib ports in micropython-lib, especially given the fact that dev-lib wouldn't care about *nix at all, while lib does that. Though I guess it would also work that way.

Damien
Site Admin
Posts: 581
Joined: Mon Dec 09, 2013 5:02 pm

Re: Module for DHT22 temperature/humidity sensor

Post by Damien » Thu Nov 06, 2014 10:06 am

Thanks for link to the wiki. I will link it from the docs.

I think we are intending to put all libraries in the micropython-lib repo and have a way for multiple platforms to coexist. But we still need to work out the details of this.

User avatar
polygontwist
Posts: 36
Joined: Sat Jun 28, 2014 4:54 pm
Location: Germany, Rostock
Contact:

Re: Module for DHT22 temperature/humidity sensor

Post by polygontwist » Tue Dec 30, 2014 1:30 am

Hello,

i fork the script for DHT11 and DHT22 Sensor:
https://github.com/polygontwist/uPython-DHT22

have fun

br0t
Posts: 12
Joined: Tue Dec 05, 2017 1:23 pm

Re: Module for DHT22 temperature/humidity sensor

Post by br0t » Tue Dec 05, 2017 1:37 pm

I am having trouble making this work. I have a pyboard lite v1.0 and a DHT22: Running the DHT22.py will always give me "Data transfer failed: 0 falling edges only". I am sure the DHT22 is connected correctly. How would I go and debug this now? How could I make sure the sensor actually works? Sorry, very new to this stuff.

User avatar
mcauser
Posts: 324
Joined: Mon Jun 15, 2015 8:03 am

Re: Module for DHT22 temperature/humidity sensor

Post by mcauser » Wed Dec 06, 2017 3:37 am

All of my drivers are tagged with "micropython" topic on github:
https://github.com/topics/micropython

The polished ones submitted to pypi and tagged with "Programming Language :: Python :: Implementation :: MicroPython"
https://pypi.python.org/pypi?:action=browse&c=639
https://pypi.python.org/pypi?%3Aaction= ... icropython

User avatar
mcauser
Posts: 324
Joined: Mon Jun 15, 2015 8:03 am

Re: Module for DHT22 temperature/humidity sensor

Post by mcauser » Wed Dec 06, 2017 3:50 am

IMHO, swap the DHT22 for a AM2320.
It's a newer version of the DHT22 with dual interface 1-wire + I2C.

I even wrote a library for it:
https://github.com/mcauser/micropython-am2320

The AM2320 is around $1 cheaper than the DHT22 on AliExpress.

Post Reply