Using Qwiic with Python Through a Binho USB Host Adapter

Hello! I’m working on a project using two Qwiic devices (an accelerometer and the glove flex sensor). I’d be reading their values on a Windows PC, with a Binho USB Host Adapter acting as an intermediary. I’m planning on doing this using Python, as there are Python libraries for both the Binho adapter and Qwiic.

The problem is that the Qwiic library, when trying to list devices, throws an error because of the OS name. I get this error:

AttributeError: module 'os' has no attribute 'uname'

I assume this is because it’s expecting me to be using Linux (as the Qwiic Python libraries seem to be intended for SBCs). Is there anyway around this, or will it simply not work? Can I use conventional I2C commands, or do Qwiic devices only work with the Qwiic libraries?

Thanks for any help you all can provide!

Hi Cameron,

That is correct. The Qwiic Python package is only supported on [these platforms. The Qwiic devices can absolutely be controlled with standard I2C read/write commands. The source files for the Python packages are available on the GitHub repository which will list the commands, registers, etc. The Arduino libraries for both boards will also have source files (header and C++) for you to use standard I2C read/write commands. For example, here is a link to the source files for our [Qwiic Flex Glove Arduino Library.

I hope this helps you get working with your Qwiic breakouts and your Binho adapter.](Qwiic_Flex_Glove_Controller/Libraries/Arduino/src at master · sparkfun/Qwiic_Flex_Glove_Controller · GitHub)](GitHub - sparkfun/Qwiic_Py: Python package for the qwiic system.)

Thanks, I appreciate the reply!