Comments (15)
It works~ I have done that.
BTW: It's not possible for raspberry-pi to directly drive the DHT11(maybe use C is ok, but python is not), for the DHT11 use Nms interval as the protocol, while the Arduino is good to do such things.
You can use Serial for Raspberrypi to communicate with Arduino. https://github.com/winlinvip/SimpleSerial
Use Arduino to sample the DHT11 and send the data to RaspeberryPi by usb serial port.
from simpledht.
It seems the protocol between DHT22 and DHT11 is not very different, I can support DHT22, but I haven't get a DHT22, can you test it for me?
The major difference of DHT22 and DHT11 is the startup signal, DHT11 PULL LOW 18ms+, while DHT22 PULL LOW 500us+ or 1ms+.
from simpledht.
@mbeacom No plan, I have no time to play, 😄
BTW: Seems there are lots of libraries about the DHT22, why not use them?
from simpledht.
Honestly, I was just excited to see your DHT11 package, since I've been following you on GH as of lately and I'm in the middle of working on a personal, side project using the DHT11 and 22s. Haha
Regardless, Thanks for everything @winlinvip !
from simpledht.
So you are using Arduino to Sample the temperature and humidity by DHT11/22?
from simpledht.
👍 Ongoing sampling with a raspberry pi and Arduino to monitor temperature/RH!
from simpledht.
I have supported DHT22 in 32bf028, however I didn't test it yet, please use example to test it. Other examples should also work by changing the class SimpleDHT11 to SimpleDHT22.
After testing it, please close this issue. Thanks~
from simpledht.
@winlinvip I will test the patch sometime this evening and let you know!
from simpledht.
Great, what's the result?
from simpledht.
I'm trying to use this lib with an DHT22 without success. I get error 101 / 102 while trying to fetch temperature.
I can make some tests if you want!
from simpledht.
@equake Please do some tests.
from simpledht.
I will refine the protocol according to http://akizukidenshi.com/download/ds/aosong/AM2302.pdf
from simpledht.
I have verify the v1.0.5, it works with DHT11:
Sample DHT11 with RAW bits...
Sample RAW Bits: 0001 1110 0000 0000 0001 1100 0000 0000 0011 1010
Sample OK: 28 *C, 30 H
=================================
Sample DHT11 with RAW bits...
Sample RAW Bits: 0001 1110 0000 0000 0001 1100 0000 0000 0011 1010
Sample OK: 28 *C, 30 H
With DHT22:
Sample DHT22 with RAW bits...
Sample RAW Bits: 0000 0010 1011 0001 0000 0001 0001 1111 1101 0011
Sample OK: 28.70 *C, 68.90 RH%
=================================
Sample DHT22 with RAW bits...
Sample RAW Bits: 0000 0010 1010 1000 0000 0001 0010 0000 1100 1011
Sample OK: 28.80 *C, 68.00 RH%
Remark: Notice that the DHT11 humidity is H, while DHT22 is RH%, for example:
Humidity:0011 0101=35H=53%RH
from simpledht.
Doesn't work below freezing. Returns an absurd answer -2856. This with DHT22.
from simpledht.
from simpledht.
Related Issues (20)
- Compilation problem with modules HOT 2
- Errors with timerone HOT 2
- Example code question. HOT 3
- Where are the error codes listed? HOT 3
- Is it possible to set the pin mode of the DHT22 pin? HOT 1
- Getting error `SimpleDHTErrStartLow` unnecessarily HOT 2
- DHT22 does not work inside sketch HOT 4
- Err : 5904 and/or 6160 HOT 1
- Problems using Arduino Uno HOT 1
- Can we make setPin() public? HOT 1
- levelTimeout is 5s not 500ms HOT 1
- New Feature suggestion 😀 Link to Online Simulator for SimpleDHT HOT 4
- DHT22 reading doesn't work when WiFi switched off HOT 2
- SimpleDht rawbits. HOT 1
- Error Code
- Library 1.0.14 Issue HOT 2
- [Improvement] [DHT11] It is possible to get tenths of temperature HOT 2
- doc in SimpledDHT.h appears to be incorrect HOT 1
- Empty constructor fails, I don't understand why
- read2( ) which uses float temperature and humidity only return integer values.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpledht.