library for easy access to xbox 360 controller, and probably others too
Import xcontroller.py
call xcontrollet.get_count() to get number of controllers
call pad = xcontroller.get_controller( i ) to get i'th controller
call pad.l_x() for value of x axis of left stick
example of this can be seen in test1.py
axes return values from -100 to 100
triggers from 0 to 100
buttons 0 or 1
| l_x() | left stick x axis |
|---|---|
| l_y() | left stick y axis |
| r_x() | right stick x axis |
| r_y() | right stick y axis |
| l_t() | left trigger |
| r_t() | right trigger |
| l_b() | left button |
| r_b() | right button |
| b_a() | a button |
| b_b() | b button |
| b_x() | x button |
| b_y() | y button |
| h_u() | hat up |
| h_d() | hat down |
| h_l() | hat left |
| h_l() | hat right |
| b_l() | left stick press |
| b_r() | right stick press |
| b_back() | back button |
| b_start() | start button |
| b_xbox() | guide button |