Latest Kernel has DHT11 and DHT22 drivers under IIO subsystem. We shall see it working on BBB very soon.
regards, Benito. On Friday, February 21, 2014 11:07:01 AM UTC-3, [email protected] wrote: > > Hi, > > I am trying to use this code with an Adsong dht22 (am2302) temp/rh sensor > running on the BBB. I haven't used C for a number of years so I am kind of > rusty. What modifications did you make to compile it with g++ on the BBB? > How does portG map to the pinout on the BBB? Or what pin do I connect the > data line to on the BBB? > > Thanks! > > On Tuesday, October 8, 2013 11:06:43 AM UTC-4, Lloyd Bailey wrote: >> >> You can modify this code http://www.acmesystems.it/?id=89 >> >> I have and it works on my Beaglebone black. :) >> >> On Wednesday, 28 August 2013 04:25:30 UTC+1, CJNZ wrote: >>> >>> Hi Hunyue, >>> >>> I am trying to get the SHT15 working on a classic Beagle. >>> I realise this is an old thread, but I am struggling a bit with the code. >>> Do you still have a code example that you could share? >>> Did you just connect clock and data to standard GPIO and 3.3 and ground? >>> >>> Thanks, >>> CJ >>> >>> On Tuesday, October 16, 2012 7:41:20 PM UTC+13, H wrote: >>>> >>>> On Mon October 15 2012 19:08:51 Aaron Patterson wrote: >>>> > On Mon, Oct 15, 2012 at 4:58 PM, Dan Watts >>>> <[email protected]> wrote: >>>> > > Hi, >>>> > > >>>> > > You're right: the Adafruit code does look odd. >>>> > > >>>> > > As you say, to initiate communication with the DHT11/DHT22, >>>> > > you're supposed to pull the signal low for > 18 ms, then >>>> > > high, then wait for the signal to be pulled low again. >>>> > > Their code appears to skip the pull-high part. I can only >>>> > > assume that the Pi stops pulling the signal low when it >>>> > > switches to input mode. >>>> > > >>>> > > The only possible problem I can see in your code is that you >>>> > > might not be pulling the signal low for long enough: perhaps >>>> > > the usleep(2000) should be usleep(20000)? Also, trying to >>>> > > catch that 40 microsecond signal that begins the DHT22's >>>> > > response is tricky - that's probably why the Pi's code >>>> > > doesn't pull the line high explicitly. Perhaps dropping the >>>> > > digitalWrite(HIGH) from your code would have the same >>>> > > effect? >>>> > >>>> > I gave both of these a whirl, and they did not work. I am >>>> > able to see the signal on my oscilloscope, though I'm new to >>>> > using the oscilloscope, so I'm not 100% sure. >>>> > >>>> > > I have my doubts about whether reading data from the DHT22 >>>> > > can work reliably from Linux code, given the tight timing >>>> > > involved. Apparently the Adafruit code is managing to do it >>>> > > on the Pi, but there is a warning at the beginning of their >>>> > > tutorial saying it may not work, and perhaps the library >>>> > > they are using is more optimized than what is available for >>>> > > the Bone. >>>> > >>>> > Yes, I read that. I'm starting to have the same doubts as >>>> > well. >>>> > >>>> > > Personally, I wimped out and use a separate processor to >>>> > > read the DHT22. I actually use a .Net Micro Framework >>>> > > processor for this (which surprisingly is able to handle the >>>> > > timings) and serial I/O, but something like the ATTiny2313 >>>> > > and I2C would be a better design. >>>> > >>>> > I'm starting to think I might need to do the same. I'll give >>>> > the Pi a try, and I've got an Electric Imp on the way, so >>>> > I'll probably try it too. >>>> >>>> >>>> That would appear to be an overkill to toss in another processor. >>>> Prehaps a different part would be more appropriate? >>>> >>>> FWIW, I recently got a humidity sensor working on the classic >>>> Beagle. This is the SHT-15 part. Everything pretty much was drop >>>> in. Hookup. The setup was: >>>> >>>> SHT-15 - <Level Converter, 3.3V source> - Beagle Classic. >>>> >>>> Driver for it was all upstream. It is built on top of the GPIO >>>> subsystem. The level converter and 3.3V are option on the >>>> beaglelcd board. Write up for it will be posted as time permits. >>>> >>>> Since IO on the bone is 3.3V, the level converter won't be >>>> needed. >>>> >>>> > >>>> > I've built a meat curing fridge, and I'm trying to build an >>>> > internet enabled controller. I've built a monitor for it >>>> > using the TI Launchpad, and I'd like to build something that >>>> > will post the information to the internet (without hooking up >>>> > to my laptop and reading from a TTY). I suppose I could try >>>> > XBee, but everything seems much harder since I'm not using an >>>> > Arduino. :-( >>>> > >>>> > Anyway, thanks for the response. If I can't get the Pi or the >>>> > Imp to work out, I'll hook the Launchpad up to the Bone via >>>> > UART. >>>> > >>>> > Again, thanks for your time. I appreciate the response! >>>> > >>>> >>>> -- >>>> Hunyue Yau >>>> http://www.hy-research.com/ >>>> >>> -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
