Auto run from bootup

Auto run on bootup.

Hi, I'm trying to make my first robot / r.c car using the zeroborg board. I've managed to get motor's working remotely using a easysmx wifi controller, (this worked straight away, p&p, after hours trying to get a PS3 remote working) At the moment I'm using the "run" script. To load from terminal I enter
cd ~/zeroborg
./runMecanumJoy. sh
This works fine. I would now like to run the script at boot up, but just can not get any of the many ways I've found to work. As a very old python /pi virgin I'm sure it's something simple but wold appreciate any help
This is how I thought it should work.😕
Sudo nano / etc/ rc.local
Then at the end of script above exit 0
Sudo /home/pi/zeroborg / &
Thanks for taking the time to read my post. John

piborg's picture

It sounds like you are doing the right thing.

Unfortunately Linux is very picky about spellings, spacing, and upper / lower case letters.
It is worth double-checking everything is exactly as below.

The file to edit is: sudo nano /etc/rc.local

The end of the script should be:

sudo /home/pi/zeroborg/ &
exit 0

What should then happen is that the script gets run just before the user prompt appears.
If you run the Raspberry Pi with a monitor attached you should be able to see the output.
If there are any problems running the script they should be displayed at this point.

Thanks for quick answer. I've tried many times , making sure I checked every thing, but still can not get it to work. Seems this is a common problem. Any other suggestions would be greatly appreciated. Thanks for your time and help.

piborg's picture

The most likely explanation is that there is some kind of error preventing the script from starting.

If you can take a photo of the monitor once it has finished booting so we can take a look at the messages.
You may need to press CTRL + ALT + F1 to see the text output first.

Would you believe it. Decided to format my sd card and do a new install before doing the test above, and it worked first time. Must have been something I'd done over the past few days, but I learnt one thing new , how to look at messages on the monitor. Thanks for all your time. John

Subscribe to Comments for "Auto  run from bootup "