A robot rover using a PiZero – Part 2

Yorkshire versus Lancashire Pi Wars here we come! 

I’ve been working on getting my PiZero robot rover to start-up automatically when switching on the battery pack. Here are the instructions:


Get your robot running on start-up with a Raspberry Pi (I was using a PiZero)

Open the LXTerminal to amend the Cron table


sudo apt-get update


sudo apt-get install gnome-schedule

(I ignored some stuff that said I hadn’t got everything). When done type:

crontab -e

then choose the nano editor (usually no. 2)

and at the end of the document add:

@reboot python3 /home/pi/EduKitRobotics/4-driving.py

or your particular file (with path) instead of the part in red,

then choose Ctrl and X together, then (when you’re asked whether to save) Y and enter.

Then, when you reboot, your python code will start automatically. Shutdown and detach your robot from its monitor, etc.

Your robot will now start automatically when you attach a suitable power supply to your PiZero. (Don’t forget to switch on the battery that runs the wheels too!)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s