Template:PT1 1046 LNX: Difference between revisions
From Phidgets Support
(Created page with "<div class="phd-slide-deck" data-deck="PT1_1046_WIN"> <div class="phd-slide-deck-header"><h3>PhidgetBridge - Windows</h3></div> <div class="phd-slides"> <div class="phd-slide"...") |
No edit summary |
||
Line 1: | Line 1: | ||
<div class="phd-slide-deck" data-deck=" | <div class="phd-slide-deck" data-deck="PT1_1046_LNX"> | ||
<div class="phd-slide-deck-header"><h3>PhidgetBridge - | <div class="phd-slide-deck-header"><h3>PhidgetBridge - Linux</h3></div> | ||
<div class="phd-slides"> | <div class="phd-slides"> | ||
<div class="phd-slide"> | <div class="phd-slide"> | ||
<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/ | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_LNX/350x-/50/1046.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 18: | Line 18: | ||
<h2>Step 1: Install Phidgets Library</h2> | <h2>Step 1: Install Phidgets Library</h2> | ||
<p> | <p>1. First, you need to install the libusb-1.0 development libraries. For example, in Debian based distributions:</p> | ||
< | <div class="phd-command-line"><code>apt-get install libusb-1.0-0-dev</code></div> | ||
< | <br /> | ||
<p> | <p>You’ll also need a C compiler and builder, if you don’t already have one installed.</p> | ||
<div class="phd- | <div class="phd-command-line"><code>apt-get install gcc</code></div> | ||
< | <div class="phd-command-line"><code>apt-get install make</code></div> | ||
</div> | </div> | ||
Line 36: | Line 34: | ||
<h2>Step 1: Install Phidgets Library</h2> | <h2>Step 1: Install Phidgets Library</h2> | ||
<p>2. | <p>2. Next, download and unpack the Phidgets library:</p> | ||
< | <p>● <span>[https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22.tar.gz libphidget22]</span></p> | ||
</div> | </div> | ||
Line 44: | Line 42: | ||
<h2>Step 1: Install Phidgets Library</h2> | <h2>Step 1: Install Phidgets Library</h2> | ||
<p> | <p>3. Use the following commands in the location you unpacked to install the library:</p> | ||
<div class="phd- | <div class="phd-command-line"><code>./configure</code></div> | ||
</div> | |||
<div class="phd- | <div class="phd-command-line"><code>make</code></div> | ||
< | |||
<div class="phd-command-line"><code>sudo make install</code></div> | |||
<div class="phd- | |||
</div> | </div> | ||
Line 60: | Line 54: | ||
<h2>Step 1: Install Phidgets Library</h2> | <h2>Step 1: Install Phidgets Library</h2> | ||
<p> | <p>4. (Optional) You can also download and unpack the following optional packages:</p> | ||
< | <p> | ||
</ | ● <span>[https://www.phidgets.com/downloads/phidget22/servers/linux/phidget22networkserver.tar.gz phidget22networkserver]</span> - Phidget Network Server, which | ||
enables the use of Phidgets over your network | |||
</p> | |||
< | <p> | ||
< | ● <span>[https://www.phidgets.com/downloads/phidget22/tools/linux/phidget22admin.tar.gz phidget22admin]</span> - Admin tool to track who is connected to your | ||
Phidgets when using the network server | |||
</p> | |||
<p> | <p> | ||
● <span>[https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22extra.tar.gz libphidget22extra]</span> - Required for phidget22networkserver | |||
and phidget22admin | |||
</p> | |||
< | <p>● <span>[https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22java.tar.gz libphidget22java]</span> - The Java libraries for Phidget22</p> | ||
</ | |||
< | <br /> | ||
<p>For installation instructions for these packages, see the README file included with each one.</p> | |||
<p> | |||
</div> | </div> | ||
Line 92: | Line 81: | ||
<h2>Step 2: Connect Devices</h2> | <h2>Step 2: Connect Devices</h2> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/ | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_LNX/-x320/50/1046_functional.jpg"></div> | ||
<p>● Connect USB Cable to your computer and PhidgetBridge</p> | <p>● Connect USB Cable to your computer and PhidgetBridge</p> | ||
Line 102: | Line 91: | ||
<h2>Step 3: Verify Connection</h2> | <h2>Step 3: Verify Connection</h2> | ||
<p>1. | <p> | ||
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: | |||
</p> | |||
<p>● <span>[https://www.phidgets.com/downloads/phidget22/examples/c/Manager/Phidget22_HelloWorld_C_Ex.zip HelloWorld C Example]</span></p> | |||
<p> | |||
</div> | </div> | ||
Line 114: | Line 102: | ||
<h2>Step 3: Verify Connection</h2> | <h2>Step 3: Verify Connection</h2> | ||
<p>2. | <p>2. Next, open the terminal in the location where you unpacked the example. Compile and run using:</p> | ||
<div class="phd-command-line"><code>gcc HelloWorld.c -o HelloWorld -lphidget22</code></div> | |||
<div class="phd-command-line"><code>sudo ./HelloWorld</code></div> | |||
<p>ou should receive a “Hello” line for each Phidget channel that is discovered:</p> | |||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_LNX/-x180/50/helloworld.png"></div> | |||
< | <p> | ||
{{UGC-Entry|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.}} | |||
</p> | |||
</div> | </div> | ||
Line 122: | Line 121: | ||
<h2>Done!</h2> | <h2>Done!</h2> | ||
<p>If you're able to see | <p>If you're able to see your devices in the Hello World example, you're done with the Setup part of this guide.</p> | ||
<p>Scroll down to <b>Part 2: Using Your Phidget</b> for the next step.</p> | <p>Scroll down to <b>Part 2: Using Your Phidget</b> for the next step.</p> | ||
Line 128: | Line 127: | ||
<br /> | <br /> | ||
<p>For more | <p>For more info installing in Linux (e.g. Udev rules, old versions, etc.), visit this page:</p> | ||
<p>● <span>[https://www.phidgets.com/docs/OS_- | <p>● <span>[https://www.phidgets.com/docs/OS_-_Linux#Advanced_Information Linux Advanced Information]</span></p> | ||
</div> | </div> | ||
</div> | </div> | ||
Line 144: | Line 143: | ||
<div class="phd-simple-button phd-to-slide-button" data-navigation-direction="next">»</div> | <div class="phd-simple-button phd-to-slide-button" data-navigation-direction="next">»</div> | ||
</div> | </div> | ||
<div hidden class="phd-hidden-breadcrumb-label" data-label=" | <div hidden class="phd-hidden-breadcrumb-label" data-label="Linux Install"></div> | ||
</div> | </div> |