DHT22 RASBERRY PI @ REBOOT
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/

DHT22 RASBERRY PI @ REBOOT

by ECHO_MIS on Wed Oct 16, 2013 11:16 am

Hello,

I have been working on a room temperature and humidity logger for an equipment room. I am using the DHT22 connected to the Rasberry PI.

I have implemented the code from Adafruit website and it works great from a shell command.

The problem I am encountering is that I would like to start the python script at boot up. I have not been able to find a successful way to start the python script at boot up. Since my Rasberry Pi will be in a remote area I would like the python script to start up every time at boot up.

I have used crontab and have created a script file which points to the python script, with no luck.

I have been able to execute other python scripts at boot up with out any problems, is their a trick to it since the python script is calling a C code.

Any suggestions would be greatly appreciated.

Best regards,

Edgar
ECHO_MIS
 
Posts: 2
Joined: Wed Oct 16, 2013 10:43 am

Re: DHT22 RASBERRY PI @ REBOOT

by franklin97355 on Wed Oct 16, 2013 4:56 pm

Edgar, this would be more suited in the General Projects or Raspberry pi accessories sections as it has nothing to do with Arduinos.
User avatar
franklin97355
 
Posts: 5884
Joined: Mon Apr 21, 2008 2:33 pm

Re: DHT22 RASBERRY PI @ REBOOT

by adafruit_support_mike on Wed Oct 16, 2013 5:09 pm

Moved to the RasPi forum, and could you please post the code you're using, both the crontab entry and the script it calls.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10750
Joined: Thu Feb 11, 2010 2:51 pm

Re: DHT22 RASBERRY PI @ REBOOT

by ECHO_MIS on Wed Oct 16, 2013 5:28 pm

Sure will sorry about that, new to this forum.
ECHO_MIS
 
Posts: 2
Joined: Wed Oct 16, 2013 10:43 am

Re: DHT22 RASBERRY PI @ REBOOT

by adafruit_support_mike on Thu Oct 17, 2013 2:01 am

Enh.. it's not like we're going to take you out back and beat up your Arduino. ;-)

What code are you trying to launch? If you've gotten other scripts to launch with the same method, you're probably running into an error that causes the script to fail rather than running.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10750
Joined: Thu Feb 11, 2010 2:51 pm

Re: DHT22 RASBERRY PI @ REBOOT

by waltr on Thu Oct 17, 2013 11:32 am

Googling "linux start python progrm on boot" found a number of answers including the Raspberry Pi Org forum.
http://www.raspberrypi.org/phpBB3/

There are many ways to start a program on boot in linux. One of the methods discussed should work to way you needed it to.
waltr
 
Posts: 271
Joined: Wed Jun 12, 2013 5:01 pm