Skip to content

daysgobye/controller_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

controller_py

Gamepad Firmware - Configuration via JSON

This firmware allows you to configure a gamepad by providing a JSON file containing the pin configurations for buttons and joysticks. The firmware reads the JSON file and sets up the gamepad accordingly.

Getting Started

To use this firmware, follow the steps below:

  1. Clone or download the gamepad firmware repository.
  2. Install the necessary dependencies and libraries for your development board.
  3. Connect the buttons and joysticks to the appropriate pins on the development board.
  4. Create a JSON file with the pin configurations for the buttons and joysticks.
  5. Flash the firmware onto the development board.
  6. Start using the gamepad with the configured button and joystick mappings.

JSON Configuration

The JSON file should have the following structure:

{
  "pins": {
    "left_joy_x": "GPIO26",
    "left_joy_y": "GPIO27",
    "right_joy_x": "GPIO28",
    "right_joy_y": "GPIO29",
    "button_a": "GPIO0",
    "button_b": "GPIO1",
    "button_x": "GPIO2",
    "button_y": "GPIO3",
    "button_select": "GPIO4",
    "button_start": "GPIO5",
    "left_joy_button": "GPIO6",
    "right_joy_button": "GPIO7",
    "button_lb": "GPIO8",
    "button_rb": "GPIO9",
    "button_lt": "GPIO10",
    "button_rt": "GPIO11"
  }
}
  • left_joy_x, left_joy_y, right_joy_x, and right_joy_y represent the pins for the joystick axes.
  • button_a, button_b, button_x, button_y, button_select, button_start, left_joy_button, right_joy_button, button_lb, button_rb, button_lt, and button_rt represent the pins for the buttons.

Replace the "GPIOXX" values with the actual pin numbers or GPIO identifiers according to your development board.

Flashing the Firmware

To flash the firmware onto the development board, follow the instructions provided in the repository's documentation. Ensure that you have the necessary tools and utilities set up for your development board.

Testing and Troubleshooting

To test the configured gamepad, connect it to a computer or game console that recognizes USB gamepad input. Verify that the buttons and joysticks are functioning as expected.

If you encounter any issues or need assistance, refer to the documentation and troubleshooting section of the repository for troubleshooting tips and common problems.

Contributing

Contributions to the gamepad firmware project are welcome! If you find any bugs or have suggestions for improvements, feel free to open an issue or submit a pull request.

License

This firmware is released under the MIT License. Feel free to use, modify, and distribute it according to the terms of the license.

Acknowledgements

We would like to acknowledge the contributions of the developers and contributors who have made this firmware possible. Thank you for your time and effort!


Feel free to customize the README file according to your specific firmware and project details. Include any additional sections or information that might be relevant to your users.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages