Just thought I’d leave a couple of links to some guides I came across for setting up boot scripts on a raspberry pi.
Quick guide on how to get them running: http://www.instructables.com/id/Raspberry-Pi-Launch-Python-script-on-startup/
How to delay the boot process until the network is available: https://raspberrypi.stackexchange.com/a/45774
A bit of weird issue today – my RaspberryPi kept reverting to the login screen. To get around this, open command prompt from the login screen (ctrl + f1) and then run sudo rm ~/.Xauthority
Reboot and then it should work normally.
I ran into a bit of a weird issue with a raspberry pi camera preview today. After starting the preview I hit an uncaught exception which meant that exitPreview was never called.
To get around this use the terminal hotkey and kill the python process. Note that while you won’t be able to see the terminal, it will be running in the background.
ctrl + alt + t
Ran into a really obvious mistake today working with an Arduino. Thought I’d corrupted a boot loader and couldn’t get Serial.println to return anything. Turned out I’d just missed Serial.begin(9600).