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="PT1_1046_WIN">
<div class="phd-slide-deck" data-deck="PT1_1046_LNX">
<div class="phd-slide-deck-header"><h3>PhidgetBridge - Windows</h3></div>
<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/PT1_1046_WIN/350x-/50/1046.jpg"></div>
<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>Before you begin using your Phidgets, you will need to install the Phidget Library.</p>
<p>1. First, you need to install the libusb-1.0 development libraries. For example, in Debian based distributions:</p>


<p>1. Download the installer for your system:</p>
<div class="phd-command-line"><code>apt-get install libusb-1.0-0-dev</code></div>


<p><span>[https://www.phidgets.com/downloads/phidget22/libraries/windows/Phidget22-x86.exe ● 32-bit Installer Download]</span></p>
<br />
 
<p><span>[https://www.phidgets.com/downloads/phidget22/libraries/windows/Phidget22-x64.exe ● 64-bit Installer Download]</span></p>


<p>If you're unsure which one you should get, press <kbd>⊞ WIN</kbd> + Pause/Break:</p>
<p>You’ll also need a C compiler and builder, if you don’t already have one installed.</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/64bit.jpg"></div>
<div class="phd-command-line"><code>apt-get install gcc</code></div>


<p>Before installing our libraries, be sure to read our <span>[https://www.phidgets.com/docs/Software_License Software License]</span>.</p>
<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. Open the download. If it asks you for permission, select <b>Run</b></p>
<p>2. Next, download and unpack the Phidgets library:</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/runfile.jpg"></div>
<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>3a. Select <b>Next</b></p>
<p>3. Use the following commands in the location you unpacked to install the library:</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/-x350/50/win_install1.jpg"></div>
<div class="phd-command-line"><code>./configure</code></div>
</div>


<div class="phd-slide">
<div class="phd-command-line"><code>make</code></div>
<h2>Step 1: Install Phidgets Library</h2>


<p>3b. Read the Licence Agreement. Select <b>Next</b>.</p>
<div class="phd-command-line"><code>sudo make install</code></div>
 
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/-x350/50/win_install2.jpg"></div>
</div>
</div>


Line 60: Line 54:
<h2>Step 1: Install Phidgets Library</h2>
<h2>Step 1: Install Phidgets Library</h2>


<p>3c. Choose Installation Location. Select <b>Next</b>.</p>
<p>4. (Optional) You can also download and unpack the following optional packages:</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/-x350/50/win_install3.jpg"></div>
<p>
</div>
● <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>


<div class="phd-slide">
<p>
<h2>Step 1: Install Phidgets Library</h2>
<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>3d. Confirm Install</p>
<p>
● <span>[https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22extra.tar.gz libphidget22extra]</span> - Required for phidget22networkserver
and phidget22admin
</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/-x350/50/win_install4.jpg"></div>
<p>● <span>[https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22java.tar.gz libphidget22java]</span> - The Java libraries for Phidget22</p>
</div>


<div class="phd-slide">
<br />
<h2>Step 1: Install Phidgets Library</h2>
 
<p>3e. Wait for Installation to complete. This should only take a few moments.</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/-x350/50/win_install5.jpg"></div>
<p>For installation instructions for these packages, see the README file included with each one.</p>
</div>
 
<div class="phd-slide">
<h2>Step 1: Install Phidgets Library</h2>
 
<p>3f. Installation Complete. Close installation Window.</p>
 
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/-x350/50/win_install6.jpg"></div>
</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/PT1_1046_WIN/-x320/50/1046_functional.jpg"></div>
<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. Open the Phidgets Control Panel:</p>
<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>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/-x210/50/win_panel1.jpg"></div>
<p><span>[https://www.phidgets.com/downloads/phidget22/examples/c/Manager/Phidget22_HelloWorld_C_Ex.zip HelloWorld C Example]</span></p>
 
<p>If your Control Panel does not open, look in your taskbar. Double click the Phidget Icon.</p>
 
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/-x80/50/win_panel2.jpg"></div>
</div>
</div>


Line 114: Line 102:
<h2>Step 3: Verify Connection</h2>
<h2>Step 3: Verify Connection</h2>


<p>2. If connected, your Phidgets will appear in the Phidget Control Panel.</p>
<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>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT1_1046_WIN/1046-Panel.jpg"></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 and interact with your devices in the Phidget Control Panel, you're done with the Setup part of this guide.</p>
<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 help installing in Windows (e.g. manual install, using a VM, etc.), visit this page:</p>
<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_-_Windows_Advanced_Information Windows Advanced Information]</span></p>
<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="Windows Install"></div>
<div hidden class="phd-hidden-breadcrumb-label" data-label="Linux Install"></div>
</div>
</div>

Latest revision as of 17:09, 16 March 2021

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 PhidgetBridge

● Connect a load cell or other wheatstone bridge sensor to the PhidgetBridge

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

«
»