USB Joystick using an RPi zero as the controller
The default configuration sends the joystick direction to the connected USB device as if the arrow keys on a keyboard were pressed
sudo echo "dtoverlay=dwc2" | sudo tee -a /boot/config.txt
sudo echo "dwc2" | sudo tee -a /etc/modules
sudo echo "libcomposite" | sudo tee -a /etc/modules
Use these pins or change the connections in the joystick.py file