OpenC3 COSMOS XBox360 USB Controller Bridge
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-19 21:24:59 +02:00
.gitignore initial commit 2026-09-19 21:07:13 +02:00
.python-version initial commit 2026-09-19 21:07:13 +02:00
bridge.txt initial commit 2026-09-19 21:07:13 +02:00
LICENSE.md add LICENSE 2026-09-19 21:24:59 +02:00
pyproject.toml initial commit 2026-09-19 21:07:13 +02:00
README.md add LICENSE 2026-09-19 21:24:59 +02:00
uv.lock initial commit 2026-09-19 21:07:13 +02:00
xbox360_interface.py initial commit 2026-09-19 21:07:13 +02:00
xbox360_raw_test.py initial commit 2026-09-19 21:07:13 +02:00

OpenC3 COSMOS XBox360 USB Controller Bridge

This is a bridge to get XBox360 USB controller events into OpenC3 COSMOS.

In COSMOS, you need to install the XBox360 USB Controller plugin to read inputs as telemetry.

Preliminaries

  1. Install uv

See https://docs.astral.sh/uv/getting-started/installation/.

  1. Install libusb
$ brew install libusb
  1. Sync Python packages
$ uv sync

Usage

  1. Run the bridge
$ sudo env PYTHONPATH=. $(pwd)/.venv/bin/openc3pycli bridge bridge.txt

The invocation is a bit complicated because you need to be root to read from the USB device (sudo), but then need to get into the right virtual environment (env and PYTHONPATH=), and then call through the OpenC3 CLI ($(pwd)/.venv/bin/openc3pycli).

  1. Debugging

If you're unsure whether your XBox360 controller is sending something (or your script is reading it properly), you can use the test script.

$ sudo uv run xbox360-raw-test.py 

Now twiddle the sticks a bit. You should get some data.

License

This OpenC3 bridge is released under the MIT License. See LICENSE.md