emonglcd + dht22

is possible to use a DHT22 instead of DS1820 in emonglcd 1.4 or 1.5?

modenet's picture

Re: emonglcd + dht22

114 reads and no suggests? no one has my need? thanks

seannation's picture

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

Robert Wall's picture

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.

modenet's picture

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?

Robert Wall's picture

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.