Comments (4)
It's technically possible but you'd essentially need to recreate much of the project from scratch. The current library is built around emulating the wired controller. To emulate multiple controllers on one microcontroller you'd need to emulate the Xbox 360 wireless receiver, which is a different sort of beast.
To start, you'd need to reverse engineer how the wireless receiver works. Figure out which USB endpoints correspond to which controllers, how to enable/disable different controllers, how data packets are formatted, and determine what (if any) communication is going on in the background.
You'd then need to build the customized USB stack for the microcontroller of your choice. I'd imagine that the 32U4 (Leonardo, Pro Micro, etc.) is out because it only has the hardware for a handful of USB endpoints, but I haven't looked at the wireless receiver's descriptors myself so that's just a hunch.
Lastly, you'd need to modify the library backend API to support multiple controllers. At that point the library would only need a constructor modification (e.g. "XInput(uint8_t controller_number)") and then you could create different objects for each controller. In theory, at least.
In short, it would be a lot of work. It's not impossible, mind you, but I have no interest in doing it. Especially since you can get the same result by adding another $2 microcontroller.
from arduinoxinput.
Ok, thanks. I thought it could work by emulating USB Hub, but now I see on the web that it is not so easy.
$2 microcontroller? How would you do that? I thought second Arduino board is required, which is quite more expensive.
from arduinoxinput.
You could either use a second Arduino board or just the bare 32U4 microcontroller with the supporting electronics. 'Knockoff' Arduino Pro Micros are around $2 from Chinese wholesalers (AliExpress and the like).
from arduinoxinput.
Ok, I see. Thank you.
from arduinoxinput.
Related Issues (20)
- send data to arduino while emulating HOT 1
- XInput.h not found HOT 3
- bluetooth feature HOT 1
- Raspberry Pi Pico support HOT 3
- BUTTON_LOGO Does Not Result in Any Button Press HOT 2
- esp32 support HOT 1
- Non-debug mode in PlatformIO IDE HOT 2
- A question about Xinput device identification HOT 2
- Not able to get teensy board to have xinput mode Help HOT 1
- error: recipe.preproc.macros pattern is missing HOT 4
- XInput.getRumbleLeft() and XInput.getRumbleRight() byte structure HOT 2
- Is it possible to send additional 'keypresses' or buttons outside of what's provided? HOT 7
- Not issue: I just want to tip my hat. HOT 1
- Is there a way to have two ArduinoXinput devices and have them show up as two Joysticks? HOT 2
- Arduino uno R4 minima support HOT 1
- More than 1 controller like the wireless receiver HOT 1
- is it possible to use a bluetooth module(like hc06)、Pro Micro together with XInput to make gamepad wireless? HOT 1
- Using along with other libraries HOT 1
- Support with other libraries and button matrix HOT 1
- Guidance on adding support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinoxinput.