I'm trying to get input from two Joycons. I have tried joycon-python, but that gives me inaccurate stick movement. I have tried connecting via pybluez, but I can't seem to get anything to work. So far, the code I have is meant to connect to the joycon.
import bluetooth
s = bluetooth.BluetoothSocket()
s.connect("E8:DA:20:A0:22:D0")
Preferably I would also like to be able to combine inputs to function as a single controller.
This is why. Joy-con thumbsticks have some associated calibration data, if you don't calibrate then the analog values will be pretty inaccurate. Looks like
joycon-python
doesn't implement the thumbstick calibration yet.It's not really that complicated, you could probably add it yourself. Factory calibration data is stored in a block starting at 0x6000, user calibration data is at 0x8000. See DekuNukem's reverse engineering notes for instructions on how to read and apply the calibration data.