Decoding Power Data Objects in Python
Getting Power Data Objects from Acroname API
If you've used HubTool, you've probably seen this helpful screen:

And perhaps thought: "I'd really like to use those values (5.00 VDC, 3A) in my python script!"
If you've used HubTool, you've probably seen this helpful screen:
And perhaps thought: "I'd really like to use those values (5.00 VDC, 3A) in my python script!"
Among other properties, we can view:
If you haven't already, install HubTool, which is part of the Brainstem Dev Kit.
Power on the hub and connect one of the host ports to your computer
The USBHub3+ can also independently enable and disable Voltage and Data:
We'll be working interactively using the Brainstem API in a Python console so you can see the results line-by-line.
If you are not familiar with PyInstaller it is an application that allows you to bundle a python file or project into a single executable by providing a fully encapsulated environment. The benefit being that you won't need to fuss with setting up a python environment. Simply execute the application.
Many times pyinstaller can be excuited without any additional commands such as:
At Acroname, we hate it when customers have issues with software and that’s why we provide deployments for Windows, Mac and Linux across various architectures.
The USBHub3c is designed specifically for mobile device test labs, USB-PD validation testing, USB-C device production testing, end-of-line battery charge, and for testing dual role data (DRD) and dual role power (DRP) devices. Fully programmable, engineers can control USB-PD parameters, connectivity options, real-time measurements, and data.
Often a simple USB switch with a physical button is used to switch USB devices between two different host computers. In many cases it would be nice to execute the host switch without physically pushing a button on the device. The Acroname Programmable USBHub2x4 hub allows a user to switch hosts programmatically without pushing a button.
Acroname's hubs are a robust hardware solution to many common usb related tasks: remotely simulating a manual plug-cycle, charging (or not charging) batteries on connected devices, and switching control between two host computers.
Check out our new YouTube video "Up and running with BrainStem using our Python API".
This video details how to properly configure your system to communicate with our Brainstem modules. It includes: installing Python, pip, and the BrainStem API (.whl). Once everything is up and running a basic example using a USBStem module is shown. Configuration, along with the examples, are shown for both Windows and Macintosh platforms (also compatible with Linux).