is possible to use a DHT22 instead of DS1820 in emonglcd 1.4 or 1.5?
»
Archived Forum |
|
emonglcd + dht22Submitted by modenet on Wed, 16/04/2014 - 13:37is possible to use a DHT22 instead of DS1820 in emonglcd 1.4 or 1.5? » |
Re: emonglcd + dht22
114 reads and no suggests? no one has my need? thanks
Re: emonglcd + dht22
I imagine it's possible, but you'd probably need to modify the emonGLCD's code to read the DHT22 instead of the DS1820, as I am pretty sure DHT22 doesn't use OneWire transmission.
You'd also have to modify the payload sent to the emonBase to get the humidity readout.
Adafruit appear to have some code to read from a DHT22: https://learn.adafruit.com/dht
Re: emonglcd + dht22
Take a look at how the DHT22 is handled by the emonTH. Of course, there's no need to switch the power to the sensor if you are not using batteries, which is just as well as there are no spare I/O pins on the GLCD. Also note that many of the GLCD sketches use the processor and memory almost right up to the maximum, so depending on what you want to do, you may need to remove some other facilities.
Re: emonglcd + dht22
thanks for your replies.
I would only to replace ds18b20 with dht22.
so the main problem is the hardware lack of analog interfaces on emonglcd?
can I use one of the led switch DIG6 or DIG9?
Re: emonglcd + dht22
Both the DS18B20 and the DHT22 use a one-wire output, so I'm not sure why the emonTH uses the analogue pin for it. It is possible to use the analogue pins as digital, it may have been done simply for convenience when laying out the PCB. You'd better ask Glyn.