Python Forum
Interfacing with a USB game controller
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interfacing with a USB game controller
#1
When I plug a USB keyboard into my computer, I can interface with it using standard python print and read statements. The keyboard is of course a USB HID device.

If I plug in a USB HID game controller into my computer, how would I access the data to/from the controller. Is there a python library that helps in this effort? I would like to read the joystick positions for example.
Reply
#2
Hello,

I think you'll like this tutorial: http://programarcadegames.com/index.php?...d_graphics
Reply
#3
Thanks, looks like this is what I was looking for.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Interfacing from Python to GUI HMartins 7 1,541 Apr-23-2023, 06:06 PM
Last Post: HMartins
  Python and DMX (aka, light controller) ScottAF 4 2,548 Apr-06-2023, 07:09 PM
Last Post: ScottAF
  How can flask find the controller? 3lnyn0 3 1,288 Jul-08-2022, 10:05 AM
Last Post: Larz60+
  Controller Buzzer as Distance Decreases barkster 6 2,037 Nov-01-2021, 03:26 PM
Last Post: barkster
  Thoughts on interfacing with a QR code reader that outputs keystrokes? wrybread 1 1,449 Oct-08-2021, 03:44 PM
Last Post: bowlofred
  Auto re-pair / re-sync Controller via Script? User3000 2 2,281 Nov-30-2020, 11:42 AM
Last Post: User3000
  Tuning PID controller Sancho_Pansa 4 4,282 Nov-09-2020, 07:51 AM
Last Post: Sancho_Pansa
  Xbox Controller arki 0 1,686 Jun-30-2020, 10:32 AM
Last Post: arki
  Please help! Akai APC20 midi controller script versusliveact 0 2,095 Feb-14-2020, 05:37 AM
Last Post: versusliveact
  managing command codes for external controller box Oolongtea 0 1,894 Sep-19-2019, 08:32 AM
Last Post: Oolongtea

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020