THE rover. Allows controlling Raspberry Pi "rovers" remotely and interactively from any OS's command line.
There are five methods:
-
Clone the repository and manually install the requirements.
-
Clone the repository and run
pip(3) install -r requirements.txt
to install the requirements to the active Python installation. -
Clone the repository and run
pip(3) install .
in the directory you cloned it into to do the same thing and allow running with(python(3) -m )the_rover
in your terminal. -
Don't clone the repository. Just download the .whl file in the latest release and
pip install
it. -
Don't clone the repository. Just
pip install the_rover
to install from PyPi.
-
The code can be run from any OS, but must connect to a (or multiple) Raspberry Pi "rover(s)".
-
The system running the code must have
gpiozero
,pigpio
,keyboard
, andfabric
installed (Automatically installed using the last four commands for installation).
-
The code expects pins 19 and 26 to control your front left motor, 16 and 20 your front right, 27 and 22 your back left, and 23 and 24 you back right (BCM numbering). The pins to which these numbers correspond to on your Pi can be found by running the
pinout
command in Bash or at pinout.xyz. -
The code makes use of Remote GPIO to control the rover Pi, so it must have the "Remote GPIO" interface enabled in
sudo raspi-config
/Raspberry Pi Configuration/config.txt, have thepigpio
Python module installed (pip3 install pigpio
), and mustsystemctl enable pigpiod
or alternatively use cron (sudo crontab -e
) to runpigpiod
at startup (@reboot
) (Doesn't requires enabling Remote GPIO. Useful for allowing only specific IPs/hostnames using the-n
flag. See the Remote GPIO documentation for more details.) -
The code uses
raspistill
, so the "Camera" interface must be enabled insudo raspi-config
/Raspberry Pi Configuration/config.txt, and a PiCamera must be connected (Instructions here). -
The code uses SSH and SFTP, so the "SSH" interface must be enabled.
Once in the directory you cloned the repository to, you can run the code by using python(3) the_rover(/__main__.py)
unless you used the last two methods of installation.
Or, if you installed it using any of the last three installation commands, (python(3) -m )the_rover
from anywhere.
Note: Due to its dependency on the keyboard
module, the code must be run with sudo
on most Linux systems.
- Press n to switch to next rover (wraps around).
- Press p to switch to previous rover (wraps around).
- Press c to capture a picture with the picamera (and download it to the current working directory).
- WASD for controlling rover. (Only one control at a time.)