(Currently using Raspbian Jessie latest)
So currently I am trying to start a script that reads from the rf receiver and gathers the data and sends it over to the cloud...
I am trying to start this script on every boot of the Raspberry Pi 2 B+, however, the problem I am running into is this...
serial.SerialException.../dev/ttyUSB0 cannot find file or directory (doesn't exist)... something along these lines is the error code.
I have tried to run the script on boot via the systemmd following this guide... http://www.raspberrypi-spy.co.uk/2015/10/how-to-autorun-a-python-script-on-boot-using-systemd/
However it returns me an error in the log files like the one above...so I suspect that the script cannot run because a) the usb isn't ready yet (b) not enough power for usb ports? (cause I have also been getting this warning on boot recently saying usb current overcharge on port 0 or something..)
I have also tried crontab where the command I ran was..
@reboot python /home/pi/RFThingSpeak.py &
to no success... (I suspect the same error)
So is there a specific way that ACTUALLY WORKS for my case on starting a script on boot for Raspberry Pi?
Or is there a way where after the boot is complete, the script THEN runs automatically everytime? (So once the raspberry pi is ready for use it THEN runs the script automatically)
I really need this script to work on boot/ after boot as I will have my raspberry pi out on the field without a screen nor any connection to it due to the fact that it will be connected to the internet via 3G USB Dongle.
Thanks in advance!