Cant get code to run on startup.

I built the Diddy borg a while back and it runs great however i have failed to get the code to run on startup so i usually just get it running over VNC and carry on but it would be great not to have to do that.
cheers
Tim

piborg's picture

You should be able to get the scripts to run from /etc/rc.local.

Start by opening /etc/rc.local to make an addition using:
sudo nano /etc/rc.lcoal

Then add a line just above the exit 0 line that looks like this to run the script you want:

sudo /home/pi/diddyborg/diddyJoy.py &

Replace diddyJoy.py with the name of the script you want to run.

Finally press CTRL+O, ENTER to save the file followed by CTRL+X to exit nano.
Next time you power up the Raspberry Pi it should start the script for you :)

Subscribe to Comments for "Cant get code to run on startup."