I am trying to get a python script to run at startup. @adam has been working with me on this and has been instrumental in boosting my knowledge and knowing what to look for on forums etc. I decided a new thread would be best.The script is designed to look for an input on pin 22 and reboot the Rpi3 when detected. The purpose is to allow my backup solar PLduino to reboot the Rp3 in case I lose communication with it.
I did as adam suggested and added @reboot python /home/pi/reboot8.py to crontab -e but the crontab is empty otherwise as if cron services is ignoring doesn’t use crontab it or something about the script won’t be allowed to run on startup. A forum http://www.pyimagesearch.com/2016/05/16/running-a-python-opencv-script-on-reboot/#comment-428806 talks about virtual console using pi root user sudo /bin/bash. When I get to workon cv it gives me command not found. Do I need to download something like open cv3 or other?
cd /home/pi/pi-reboot (maybe leave this at /home/pi where my file resides or create that folder and move file there?)
python reboot8.py(changed to show my file)
Any help is appreciated,