DHT Humidity sensor tutorial

Talk about Adafruit Raspberry Pi® accessories!

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

DHT Humidity sensor tutorial

Postby JustRaspberry » Mon Feb 18, 2013 1:20 pm

Greetings,
I am running a last step of dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging.pdf. The last step requires me to run python script of the Adafruit_DHT_googledocs.ex.py . After typing python Adafruit_DHT_googledocs.ex.py I received a following error message.


python Adafruit_DHT_googledocs.ex.py
bcm2835_init: Unable to open /dev/mem: Permission denied
Traceback (most recent call last):
File "Adafruit_DHT_googledocs.ex.py", line 44, in <module>
output = subprocess.check_output(["./Adafruit_DHT", "2302", "4"]);
File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['./Adafruit_DHT', '2302', '4']' returned non-zero exit status 1

I am new to python. I know that my device is working and communicate with the rpi . The last step is to communicate dht22 with rpi and google spreadsheet.
I assume that python script has error or some other process is missing something to do with bc2835. Another issue could be directories?
Any ideas are appreciated.
JustRaspberry
 
Posts: 6
Joined: Sun Feb 17, 2013 1:32 pm

Re: DHT Humidity sensor tutorial

Postby adafruit_support_rick » Tue Feb 19, 2013 10:12 am

Did you run the script with sudo?
User avatar
adafruit_support_rick
 
Posts: 2907
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: DHT Humidity sensor tutorial

Postby JustRaspberry » Tue Feb 19, 2013 4:45 pm

Nope, I'll check it.
JustRaspberry
 
Posts: 6
Joined: Sun Feb 17, 2013 1:32 pm

Re: DHT Humidity sensor tutorial

Postby JustRaspberry » Tue Feb 19, 2013 8:21 pm

Yes, it works....It funny that every command has to start with sudo....
Thank you for your support. :D
JustRaspberry
 
Posts: 6
Joined: Sun Feb 17, 2013 1:32 pm

Re: DHT Humidity sensor tutorial

Postby adafruit_support_rick » Wed Feb 20, 2013 9:54 am

Don't know that it's every command, but in that step you're writing to the protected kernel area of the file system.
User avatar
adafruit_support_rick
 
Posts: 2907
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: mdax and 1 guest

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]