Feel free to use my custom parts for the donkeycar platform.
To clone everything, use
git clone https://github.com/blanck/parts.git ~/mycar/parts
Since I use different gamepads for different cars I have added the mapping in separate files
Edit config file and change CONTROLLER_TYPE to 'custom' Copy the parts file to my_joystick.py
cp parts/matricom.py my_joystick.py
add this line after the other from rows in manage.py
from parts.matricom_dc2 import JoystickController
When the gamepad is turned off, press the X and the Mode button at the same time
sudo bluetoothctl
scan on
connect <mac:id with lowest RSSI>
trust <mac:id with lowest RSSI>
quit
It should say Connection successful and [Gamepad]
Edit config file and change CONTROLLER_TYPE to 'custom' Copy the parts file to my_joystick.py
cp parts/arrogant.py my_joystick.py
add this line after the other from rows in manage.py
from parts.arrogant_dc2 import JoystickController
A part using v4l2-ctl drivers to use a USB camera image instead of PiCamera
cam = USBCamera(resolution=(160, 120), framerate = 15)
A very basic motor controller to use for 4-wheel-drive motor controllers connected to separate GPIO channels
from parts.gpio import GPIOCtrl, PWMThrottle, PWMSteering
and
steering_controller = GPIOCtrl()
steering = PWMSteering(controller=steering_controller,
left_pulse=cfg.STEERING_LEFT_PWM,
right_pulse=cfg.STEERING_RIGHT_PWM)
V.add(steering, inputs=['throttle','angle'])