Template:PT1 HUB0000 LNX: Difference between revisions

From Phidgets Support
No edit summary
No edit summary
Line 5: Line 5:
<div class="phd-panels">
<div class="phd-panels">
<div class="phd-panel phd-flex-column-align-center phd-flex-column-justify-middle">
<div class="phd-panel phd-flex-column-align-center phd-flex-column-justify-middle">
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_HUB0000_LNX/350x-/50/HUB0000_LNX.jpg"></div>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_HUB0000_LNX/350x-/50/USBHubs_LNX.jpg"></div>
</div>
</div>
<div class="phd-panel phd-flex-column-align-left phd-flex-column-justify-middle">
<div class="phd-panel phd-flex-column-align-left phd-flex-column-justify-middle">

Revision as of 19:51, 24 August 2023

Step 1: Install Phidgets Library

Step 2: Connect Devices

Step 3: Verify Connection

Step 1: Install Phidgets Library

1. First, you need to install the libusb-1.0 development libraries. For example, in Debian based distributions:

apt-get install libusb-1.0-0-dev


You’ll also need a C compiler and builder, if you don’t already have one installed.

apt-get install gcc
apt-get install make

Step 1: Install Phidgets Library

2. Next, download and unpack the Phidgets library:

libphidget22

Step 1: Install Phidgets Library

3. Use the following commands in the location you unpacked to install the library:

./configure
make
sudo make install

Step 1: Install Phidgets Library

4. (Optional) You can also download and unpack the following optional packages:

phidget22networkserver - Phidget Network Server, which enables the use of Phidgets over your network

phidget22admin - Admin tool to track who is connected to your Phidgets when using the network server

libphidget22extra - Required for phidget22networkserver and phidget22admin

libphidget22java - The Java libraries for Phidget22


For installation instructions for these packages, see the README file included with each one.

Step 2: Connect Devices

● Connect USB Cable to your Linux Computer

● Connect VINT Device(s)

Step 3: Verify Connection

1. The easiest way to verify that your libraries are working properly is to compile and run an example program. Download and unpack this C example that will detect any Phidget:

HelloWorld C Example

Step 3: Verify Connection

2. Next, open the terminal in the location where you unpacked the example. Compile and run using:

gcc HelloWorld.c -o HelloWorld -lphidget22
sudo ./HelloWorld

ou should receive a “Hello” line for each Phidget channel that is discovered:

I don’t see any Phidgets show up in the HelloWorld example

You need to run it with sudo in order to be able to access USB devices. In order to use Phidgets without sudo, you need to set your udev rules. See the Advanced Information page on the final slide of this guide for details.

Done!

If you're able to see your devices in the Hello World example, you're done with the Setup part of this guide.

Scroll down to Part 2: Using Your Phidget for the next step.


For more info installing in Linux (e.g. Udev rules, old versions, etc.), visit this page:

Linux Advanced Information

«
»