Concealedfox70
Posts: 16
Joined: Fri May 04, 2018 11:55 am

xbox.py how do i control script with controller

Sun Jun 03, 2018 9:23 pm

all the progress ive made is deleting the axis and button print function. i cant figure out how to use the controller to control anything. all it can do is the original print function that i deleted. at the bottom i added this. how do i call out an axis or button to do what i need them to? this is you guessed it a remote controlled rc car project. my programmer ditched me and now i have to do it all. when i replace 'axis' with 'l_thumb_x' it shows the x left stick moving ONLY however it still prints all the axis just under left stick x. where do i even begin? i want to send each individual function to the raspberry pi from my desktop then to a corresponding digital pin going to my 3.3v arduino which converts it to pwm for servo and motor ESC. i have the arduino code written
throttle = input('right_trigger')
reverse = input('left_trigger')
steering = input("l_thumb_x", axis, value)
headlights = input("button 9")
camerax = input("axis r_thumb_x")
cameray = input("axis r_thumb_y")

Return to “General discussion”