Hi, I was wondering if anyone has been able to get the DHT-22 humidity and temperature sensor to work with the Beagle Bone?I have a DHT-22 humidity and temperature sensor:I've been able to get it to work with the TI Launchpad, but had no such luck with the Beagle Bone. I'm powering the sensor from VDD_3V3EXP, and I have a 5.6k resistor hooked up to the data wire (though I didn't seem to need this with the Launchpad).I'm using this library for reading the GPIO pin:I tried porting my code from the Launchpad to the BeagleBone, but I can't seem to read any values from the sensor. I've verified that I can read values from the pin, but I'm not getting any values from the sensor. Adafruit has a library for reading the sensor from a Raspberry Pi:I also tried porting this code, but still can't get any information from the sensor. Also, the Adafruit code confuses me because it sends a high signal then a low signal to initiate data transfer:But the spec sheet for the sensor says you should send a low, then a high:Here is a snippet of the code I'm using just to send the start signal:pinMode(P9_12, OUTPUT, 7, PULLUP);digitalWrite(P9_12, LOW);usleep(2000);digitalWrite(P9_12, HIGH);pinMode(P9_12, INPUT, 7, PULLUP);while (digitalRead(P9_12) == 1) {}printf("direction changed\n");After I write HIGH on the pin, the sensor is supposed to pull low after about 40us, but I'm not seeing the pin change directions.Anyway, I can't seem to get this to work. Has anyone been able to make the sensor work with the BeagleBone? How should I go about debugging this? What other information can I provide to help others help me?Thanks for your time.-Aaron
I wrote this code to test the feasability : only a main method with hard-coded parameters.unsigned short pin = Beagle_GPIO::P8_3;
By the way, anyone got plausible results?
# g++ Beagle_GPIO.cpp Beagle_GPIO_dht22.cpp /tmp/ccNXFgIu.o: In function `main':Beagle_GPIO_dht22.cpp:(.text+0x21c): undefined reference to `clock_gettime'collect2: error: ld returned 1 exit status
# g++ Beagle_GPIO.cpp
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../crt1.o: In function `_start':init.c:(.text+0x34): undefined reference to `main'collect2: error: ld returned 1 exit status
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/mtWNv8Gs1d4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/mtWNv8Gs1d4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.