This article is for my hackaday.io project (BYOP).
https://hackaday.io/project/9526-bring-your-own-pizero-byop
About
How to auto run python script.
There are several ways to auto run python script.
Here's one way to do that.
setup /etc/rc.local
Raspberry Pi2 + raspbian
Setup by following http://qiita.com/7of9/items/ec9e38f84bc4351c5ee3
With root priviledge, add following lines to auto-run python script:
## for FileMessenger
cd /home/pi/python-160227-FileMessenger
nohup ./FileMessenger.py &
## for BYOP:Bring your own PiZero
cd /home/pi/python-160224-BYOP-main/
nohup ./BYOP-main.py &
exit 0
After the restart of the Raspberry Pi, you can check the scripts running by ps command.
BYOP-main.py will be automatically finished. So, ps command may not show the BYOP-main.py depending on the time.
pi@raspberrypi ~ $ ps aux | grep 15
...
root 560 0.1 0.6 10348 5936 ? S 08:40 0:00 python ./FileMessenger.py
...