-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closer integration with pinout.xyz ? #609
Comments
This is a bonkers idea, but it seems possible. I'm definitely keen to make as much API functionality available as I can for the next phase of Pinout growth. One of the key ideas behind bringing boards to Pinout was always to aggregate data so we could use it for the greater good. Anything that achieves that goal is awesome! |
BTW @Gadgetoid I just happened to spot that https://pinout.xyz/pinout/rtk_motor_controller does have a link to its GpioZero docs (cool!), but it'd be better if it linked to http://gpiozero.readthedocs.io/en/stable/api_boards.html#ryanteck-mcb-robot rather than http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot |
At the very least, the lovingly curated pinout data on https://pinout.xyz will make it easier for Python developers to hand-write the corresponding GpioZero classes :) |
I want those to be my last words. |
Regarding a |
Without nestable ButtonBoard classes, I guess you could group the buttons by doing: class ScoreZero(CompositeDevice):
def __init__(self, pin_factory=None):
super(ScoreZero, self).__init__(
dpad=ButtonBoard(
up=22,
right=23,
down=24,
left=25,
order=('up', 'right', 'down', left'),
pin_factory=pin_factory
),
buttons=ButtonBoard(
start=5,
select=6,
b=26,
a=27,
order=('start', 'select', 'a', 'b'),
pin_factory=pin_factory
),
order=('dpad', 'buttons'),
pin_factory=pin_factory
) |
Looking at e.g. https://pinout.xyz/pinout/scorezero it just occurred to me how awesome it would be if GpioZero could take some of the data from the https://github.com/gadgetoid/Pinout.xyz repo and use that to auto-generate GpioZero python classes? 😁
E.g. if https://raw.githubusercontent.com/Gadgetoid/Pinout.xyz/master/src/en/overlay/scorezero.md was modified to specify that it should create a ButtonBoard, then GpioZero could somehow auto-generate:
ping @bennuttall @Gadgetoid
Perhaps this also links in with #548 , but without the 'connections' stuff?
@Gadgetoid And on a related note, perhaps you could extend pinout.xyz so that for those boards fully supported by GpioZero, you add a link to their GpioZero class docs? :-)
E.g. https://pinout.xyz/pinout/traffic_hat could have a link to https://gpiozero.readthedocs.io/en/stable/api_boards.html#traffic-hat
@bennuttall And I guess in a similar fashion, https://gpiozero.readthedocs.io/en/stable/api_boards.html#traffic-hat could provide a link to https://pinout.xyz/pinout/traffic_hat ?
The text was updated successfully, but these errors were encountered: