Getting Started with Python and Debian
Posted: Mon Feb 26, 2018 7:55 pm
Hi,
I am trying to get started. I am trying to figure out how to list "what's attached" from the CLI on Debian.
I have setup my python work environment. I got ./helloWorld to work and I seem to be able to get a typical python3 script to run without errors (exception time out is what I get).
Output from ./helloWorld [gcc compiled]
I have a VINT hub attached, and to this hub I am trying to plugin a few devices: 1112, HIN1101_0, 1129, 1106, 1131. Certainly, I will do them one at a time, but evetually they will all be there.
When I read a lot of the sample code, it has a certain logic, "I know this is attached, and I proceed" ... I want to do just the opposite "list what is attached"
so I want "lsphidget" similar to "lsusb" on the debian platform. So in this setup a
And for starters, let's just consider the 1112 element is plugged in.
This is a VoltageRatio Input that I plugged into VINT hub port #2, but that is not the point... I want to list that it is attached, where it is attached, and then I can identify and code from there. I want to scan the VINT Hub with "lsphidget".
How?
I am trying to get started. I am trying to figure out how to list "what's attached" from the CLI on Debian.
I have setup my python work environment. I got ./helloWorld to work and I seem to be able to get a typical python3 script to run without errors (exception time out is what I get).
Output from ./helloWorld [gcc compiled]
Code: Select all
./HelloWorld
Opening...
Phidget Simple Playground (plug and unplug managers)
Press Enter to end anytime...
Hello Device 6-Port USB VINT Hub Phidget, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
I have a VINT hub attached, and to this hub I am trying to plugin a few devices: 1112, HIN1101_0, 1129, 1106, 1131. Certainly, I will do them one at a time, but evetually they will all be there.
When I read a lot of the sample code, it has a certain logic, "I know this is attached, and I proceed" ... I want to do just the opposite "list what is attached"
so I want "lsphidget" similar to "lsusb" on the debian platform. So in this setup a
Code: Select all
python3 lsphidget.py
This is a VoltageRatio Input that I plugged into VINT hub port #2, but that is not the point... I want to list that it is attached, where it is attached, and then I can identify and code from there. I want to scan the VINT Hub with "lsphidget".
How?