-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add possibility to use bluetooth controllers #26
Comments
Hi there, Thanks alot for your feedback and glad you were able to use it. It's on the roadmap to add input joystick for co-pilot usage so there will be support for it very soon. It should not be a major change but requires more testing. Let me know if there are other features that you would like to see before I release the improved version. |
Awesome! Good to hear you have plans for an improved version. I'm planning to use the pizero-joystick-xac combination with quite a lot of different input devices. So I'm looking to add a nice OLED display, some up/down/select buttons to scan for Bluetooth devices or connect them from the device itself (without the need to add a keyboard & display or ssh to it from a different machine. Also i'm going to add an off button so I can power down the pi correctly without corrupting the microSD card. If I can help out with testing, please let me know! |
Awesome! OLED display would be a great addon. Hopefully, I would be able to create an applet to replace the main desktop UI as well. That can improve the experience to next level. I would be more than happy to have some help to test the new features soon. |
Hi there Milador, Would be awesome to get it working with your scripts! If I can test stuff out, just let me know! |
HI @MrMennens-tech , I looked into it , but it would make the project way too complex as gamepads descriptors can be different for each joystick. It's possible but it would take time to test it with different joysticks. However, I can help you get it working with Logitech extreme 3d pro joystick. Run the following code ( event number can be different and not always event0 ) and press buttons and move the joystick in all directions :
Then if you send me the output (copy & paste), I can add the logic to the code. |
Thanks! Asked my new friend GPT to edit the script a bit to get some log output. See excel file for the buttons, Log1 for the axis, Log2 for the hat axis Log 1: Up, Down, Left, Right, Turn left, Turn Right, Throttle down, Throttle up If you need anything else, just let me know. |
@MrMennens-tech I will need to connect actual joystick for the axis which I probably do in next few days once I find it! I modified the code in 'passthrough' branch to handle buttons and hat axis. Give it a try and let me know. Here how you can test it:
You may need to restart your pi. |
Sadly no luck... sudo python3 gamepad_xac_inputevent.py
if i connect the Logitech Joystick to the pizero using a OTG cable it gets found when using lsusb. In both situations, the Brokenpipeerror is the same. Reboot also doesn't seem to fix it. Edit: i don't receive an error when only connected to the XAC. When i plug in the Logitech controller, everything fails. I'll check to see if a pi 2 / 3 of 4 is better equipped for the task Edit 2: after a bit of reading and researching looks like I found the problem... Pi zero is not capable of receiving USB input and OTG at the same time. Only option with a USB joystick is the Raspberry pi 4 (or a different board). To bad, really hoped i could get it to work on a pi zero (with costs and availability in mind) Only option to keep it with the pi zero is to send its data to a pi pico using serial (like the scripts from GDSports). |
alright, i've managed to get my hands on a NanoPi Neo which can do the OTG and USB-A input at the same time. the code runs, but I don't receive any output when running the script (code runs fine, shows some key stuff (see attached piece of code) but doesn't fire buttons to the XAC Gamepad connected to windows pc
|
@MrMennens-tech Thanks for trying. The code may not work on other single board computers if they lack driver support. I will need to debug the code with actual joystick as it seems I need to make more changes. |
@MrMennens-tech I have been sick in last few days and I will look into it once I am better. |
No worries, no rush! Get well soon! |
@milador How have you been? Hope you're doing better! Any chance you've been able to debug something? |
I'm using the program & Pi Zero to connect wheelchairs with Bluetooth Mouse support to the XAC
Works like a charm after fiddling with the settings.
However, there are some very nice bluetooth "VR Controllers" that i would love to connect to the XAC without gutting it open.
Would it be possible to add support for gamepad joysticks to "passthrough" the joystick command to the XAC?
Starting out with python, so i'm not able to code this myself.
The text was updated successfully, but these errors were encountered: