Python Forum

Full Version: USB question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Can python do the following ?

I have a Pi 3 with 4 USB connections.
Imagine i have 3 usb numeric keypads connected.

Can Python tell me, from which of the 3 usb slots the input comes?
In other words, can python identify USB slots ?

thx,
Paul
Hello,

This is not up to Python, but rather which of many Python HID modules you will use. But yes, the few HID modules I've seen so far gave HID devices their own IDs, so you could tell them apart when coding.

Raspberry Pi is a very popular platform, so I bet the task you have has already been solved, possibly in several ways. So give it a quick search in the internet, and see what you can find :)
OK, thanks.
A few minutes searching convinced me that i will find what i am looking for !

Paul