-
Notifications
You must be signed in to change notification settings - Fork 91
Connecting Joycon to android #29
Comments
For me it's an interesting issue, as I want to connect Joy cons to Android and raspberry pi enabled device's |
@TheBricktop So I actually found a (kind of) solution. Instead of connecting the Joy Con to my phone, I made a simple exe for my laptop which takes input from them, and then sends the data I need in packets to a receiver application on my phone, where I can then use the input. It works pretty well with not much latency (and I never tried to optimise it as I never went any further with that project). The only downside is you need to have a pc/laptop so it's not exactly a portable solution. I can give you the code if you want (not sure how to incorporate a raspi though, maybe by connecting that to the laptop as well?) |
Yea i was thinking about osc or some kind of a translator from hid to raw data, but intended way of using this was to make some kind of a better daydream controller out of existing superior joystics (and far cheaper in comparision) |
Heya! Can you drop a download link to the code? |
Hi, sorry for the late response but here is some code you might find useful! (Modified from https://forum.unity.com/threads/simple-udp-implementation-send-read-via-mono-c.15900/ to send Joycon data) Sending packets of data (for the desktop application):
Receiving packets of data (for the mobile application):
|
After much annoyance with Unity complaining about various things, and after digging through other issues, I managed to get a simple scene working, with two cuboids representing Joycon that rotate to match my two Joycon connected to my laptop. I then built the scene for android and ran it on my phone, with my two Joycon already connected and working, and... nothing. Just two lifeless cuboids staring back at me. Tried disconnecting and reconnecting the Joycon, tried restarting the app... nothing. I noticed someone else already raised an issue about android support, but it got no response. Is there some other plugin needed to be able to use this on android? (like a BLE plugin) Or is there some other way to get Unity to recognise them when they are connected to Android? (when connected to my phone the names are the exact same as on my Laptop (Joy-Con (L) and Joy-Con (R)) and they show the same controller icon)
The text was updated successfully, but these errors were encountered: