- The Pi Zero variant of 4tronix M.A.R.S. Rover Robot
- The original code from 4tronix M.A.R.S. Rover, installed as explained in Programming M.A.R.S. Rover on Raspberry Pi Zero (inc v2)
- The PiHut Wireless USB Game Controller [WUGC]
- Dependencies:
rover.py
andpca9685.py
,RPi.GPIO
,aproxeng.input
,rpi_ws281x
,python3-systemd
,dataclasses
,PyYAML
,python3-smbus
- The rpi_ws281x module is the official Python binding for the userspace Raspberry Pi library for controlling WS281X LEDs, and uses /dev/mem for DMA/PWM/PCM and /dev/gpiomem for GPIO access (see ws2811.c). Therefore, the LED control on the Rover works only with root access!
- Joysticks:
- Use left stick to set speed (forward or reverse) and right stick to set direction (left or right).
- Buttons:
- Analog for 3 sec to exit program (and stop the service unit).
- Circle+Square for 3 sec to initiate system shutdown with
./scripts/sd.sh
. - Triangle+Cross for 3 sec to initiate system reboot with
./scripts/rb.sh
.
- LEDs (must be run with root access):
- Initialisation LED sequence.
- White color in the front; red color in back; etc.
- Program termination LED sequence.
- Simple driving mode: all (6) DC motors are driven with the same speed. Direction is set only by the servo motors.
- Logging to (rotating) log file
driverover.log
and console. - Use systemd service unit to start, monitor (watchdog) and re-start the
driverRover_wugc.py
on missed watchdog; has to be installed as system-wide unit (root access) when LEDs are used! - Use YAML configuration file
driveconfig.yaml
for most common custom parameters; other parameters are configured indriveconfig.py
.
- Implement Ackermann steering driving mode (with hwd limitations). Can be set in
driverconfg.yaml
withmode: 'ackermann'
.
- Scale direction angle in the function
mixer_dir()
indrivefunc.py
. - Code clean-up. Fix most of the pylint errors and warnings (except in the orginal code
rover.py
, etc.)
- Support power management hardware for clean shutdown/poweroff: push button activated or low battery triggered. Prototype circuit diagram provided.
- Systemd services to handle power management hardware and clean shutdown/poweroff. See
scripts
for details.
- Add support for customized 2-axis camera mount
- Add support for sensors (motion, proximity, light)
- Design custom 3-D printed enclosure