Open SpiderHulkZM opened 3 years ago
Hi, I know this issue is old, so I'm unsure if I should open a new one. I see the button events getting triggered by ButtonEventJoyCon. But not the Joy stick events. Is this feature available?
Is there any example of how to get this data?
I found the answer. So in case anyone else need it too here it is:
It can be found using the get_status()
function inside the 'analog-sticks'
key
You can also use get_stick_left_horizontal()
and get_stick_left_vertical()
functions in case you don't need all the status results.
from pyjoycon import JoyCon, get_R_id
import time
joycon_id = get_R_id()
joycon = JoyCon(*joycon_id)
while(1):
print(joycon.get_status()['analog-sticks'])
print(joycon.get_stick_left_horizontal(), joycon.get_stick_left_vertical())
time.sleep(0.05)
It seems the output is not so intuitive so I used the joycon.py
file included in this fork. (That way I get (+) or (-) results depending on left right top bottom):
And that's it = )
Is there a way to implement the joycon's calibration data for the sticks with joycon-python?
I don't know how to connect the analog sticks