DHT Humidity sensor tutorial

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/
Locked
JustRaspberry
 
Posts: 6
Joined: Sun Feb 17, 2013 2:32 pm

DHT Humidity sensor tutorial

Post by JustRaspberry »

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.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: DHT Humidity sensor tutorial

Post by adafruit_support_rick »

Did you run the script with sudo?

JustRaspberry
 
Posts: 6
Joined: Sun Feb 17, 2013 2:32 pm

Re: DHT Humidity sensor tutorial

Post by JustRaspberry »

Nope, I'll check it.

JustRaspberry
 
Posts: 6
Joined: Sun Feb 17, 2013 2:32 pm

Re: DHT Humidity sensor tutorial

Post by JustRaspberry »

Yes, it works....It funny that every command has to start with sudo....
Thank you for your support. :D

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: DHT Humidity sensor tutorial

Post by adafruit_support_rick »

Don't know that it's every command, but in that step you're writing to the protected kernel area of the file system.

Locked
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/

Return to “Adafruit Raspberry Pi® accessories”