Skip to content

How to setup Game Controller with LEDs? #249

@bert-laverman

Description

@bert-laverman

I would like to use an Arduino Micro as a GameController (I assume the GamePad does this) with LEDs. (which I saw in the TeensyKeyboardAPI) I found a C library to control HID devices from Windows which supports a setLED(int, bool), but all repositories so far assume the reader knows what he is doing wrt USB communication, which I don't.

I'm not afraid of the programming, just worried about the required background knowledge on how HID devices communicate via USB, and how to extend/adapt this HID library to do what I want.

Goal is a controller that will be usable for flight simulation, but I have nice buttons with LEDs built-in, so I want to be able to tell the Arduino which LEDs to light up.

Cheers,
Bert

PS
Why does every library assume I want 32 buttons and loads of axes and Hat-switches? A constructor like:

GamePad::GamePad(int nButtons, int nAxes, int nHatswitches, int nLEDs);

would make a lot more sense...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions