Author Topic: DHT library on DigiX?  (Read 4795 times)

jdubrow

  • Newbie
  • *
  • Posts: 9
DHT library on DigiX?
« on: January 01, 2014, 09:27:57 am »
I was trying to get the DigiX to connect with my DHT22.  It always gave a read error.  Turning on debug seemed to show that the data returned was always 1s.  Anyone have an idea of what might be going wrong?  I used the same setup (DHT) on a Ardunio Mega and it was working.

Thanks in advance!

Adalricus

  • Newbie
  • *
  • Posts: 8
Re: DHT library on DigiX?
« Reply #1 on: January 01, 2014, 03:13:33 pm »
« Last Edit: January 01, 2014, 03:18:35 pm by Adalricus »

jdubrow

  • Newbie
  • *
  • Posts: 9
Re: DHT library on DigiX?
« Reply #2 on: January 01, 2014, 04:09:43 pm »
Just curious how this one differs from the built in one with the Arduino distribution?  And have you used it successfully?
« Last Edit: January 01, 2014, 04:12:02 pm by jdubrow »

Adalricus

  • Newbie
  • *
  • Posts: 8
Re: DHT library on DigiX?
« Reply #3 on: January 02, 2014, 12:32:46 am »
I don't have a dht just searched for a library that was ported to Due.

As you can read here http://playground.arduino.cc/Main/DHTLib

Just give it a try maybe it works for you

jdubrow

  • Newbie
  • *
  • Posts: 9
Re: DHT library on DigiX?
« Reply #4 on: January 02, 2014, 07:44:17 am »
Seems to have the same behavior as the built in libraries.  I tried running with with and without the level-shifter shield.  With the level-shifter sheild it looked like the data was always 0's and without it the data was always 1s being read back from the DHT.

pkourany

  • Newbie
  • *
  • Posts: 25
Re: DHT library on DigiX?
« Reply #5 on: January 03, 2014, 08:32:05 pm »
I have used a couple of DHT22's (their actually RHT03's) directly with a teensy 3 running at 3.3V.  The specs say they should work at that voltage but I had one that did not.  Make sure you use a pull-up resistor.  I tried to level-shift between the teensy 3 and a DTH22 running at 5V but did not have any success.  I used an SPI/I2C rated level shifter but I suspect the rise-time of the data signal was affected by the level shifter.

My preferred library is iDHTlib by niesteszeck (https://github.com/niesteszeck/idDHTLib).  It is interrupt driven and works well on the teensy 3 and I suspect, the digiX though I have not tested it.

Cheers!