adafruit / CircuitPython_Community_Bundle

A bundle of useful CircuitPython libraries from the CircuitPython community.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BetterPad: An easy-to-use wrapper over GamePadShift

gingershaped opened this issue · comments

GamePadShift is an essential component of some Adafruit boards (read: PyGamer), but is not very... beginner-friendly. BetterPad aims to fix that. It's a small wrapper over GamePadShift that makes it far easier to use. It provides one class, BetterPad. This class takes the same parameters as a GamePadShift class, and has one function: getPressed. This function returns a dictionary in this format: {"a": True, "b": False, ...} where the value of each key corresponds to the state of the button it represents. You can also pass a dictionary as the buttons parameter to the constructor, for different gamepads. See the attached file for the source.
betterpad.zip

You can submit this to the Community Bundle (https://github.com/adafruit/CircuitPython_Community_Bundle), if you put the code in a GitHub Repo. Transferring this issue to there.

@GingerIndustries you can follow this guide to add it to the community library.
https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-in-the-community-bundle
Ping-me in discord if you need anything.

@GingerIndustries if you want this added to the Community bundle please submit a PR, for the time being I will close this issue, Still wiling to help you in the process to add this to the community bundle if that is the path that you want to take. Thanks