Template:PT1 MOT0100 LNX: Difference between revisions

From Phidgets Support
(Created page with "<div class="phd-slide-deck" data-deck="PT1_MOT0100_LNX"> <div class="phd-slide-deck-header"><h3>PhidgetAccelerometer - Linux</h3></div> <div class="phd-slides"> <div class="phd-slide"> <div class="phd-panels"> <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_MOT0100_LNX/350x-/50/MOT0100.jpg"></div> </div> <div class="phd-panel phd-flex-column-align-left phd-flex-co...")
 
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_MOT0100_LNX/350x-/50/MOT0100.jpg"></div>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_MOT0100_LNX/350x-/50/MOT0100a.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">
Line 83: Line 83:
<div class="phd-panels">
<div class="phd-panels">
<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">
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_MOT0100_LNX/-x180/50/MOT0100_funcU.jpg"></div>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_MOT0100_LNX/-x180/50/MOT0100_funcUa.jpg"></div>
<p>● Connect USB Cable to your computer and PhidgetAccelerometer</p>
<p>● Connect USB Cable to your computer and PhidgetAccelerometer</p>
</div>
</div>
Line 90: Line 90:
</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">
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_MOT0100_LNX/-x200/50/MOT0100_funcV.jpg"></div>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_MOT0100_LNX/-x200/50/MOT0100_funcVa.jpg"></div>
<p>● Connect USB Cable to your computer and VINT Hub</p>
<p>● Connect USB Cable to your computer and VINT Hub</p>
<p>● Connect Phidget Cable to your VINT Hub and PhidgetAccelerometer</p>
<p>● Connect Phidget Cable to your VINT Hub and PhidgetAccelerometer</p>

Latest revision as of 16:31, 13 January 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 computer and PhidgetAccelerometer

● Connect USB Cable to your computer and VINT Hub

● Connect Phidget Cable to your VINT Hub and PhidgetAccelerometer

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

«
»