<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.phidgets.com/docs/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mparadis</id>
	<title>Phidgets Support - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.phidgets.com/docs/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mparadis"/>
	<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/Special:Contributions/Mparadis"/>
	<updated>2026-08-14T23:34:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Labview_trusted_files3.png&amp;diff=35698</id>
		<title>File:Labview trusted files3.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Labview_trusted_files3.png&amp;diff=35698"/>
		<updated>2026-08-06T19:56:48Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Language_-_LabVIEW&amp;diff=35697</id>
		<title>Language - LabVIEW</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Language_-_LabVIEW&amp;diff=35697"/>
		<updated>2026-08-06T19:56:38Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#seo:|description=Learn how to use Phidget USB devices with LabVIEW.}}&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
&lt;br /&gt;
==Get Started==&lt;br /&gt;
With the Phidgets LabVIEW library, it&#039;s easy to create LabVIEW VIs that work with Phidget devices.&lt;br /&gt;
&lt;br /&gt;
Please note that the Phidget LabVIEW library doesn&#039;t support the [[Phidget Network Server]], so it won&#039;t be able to access Phidgets over the local network or make use of Phidgets connected to a [https://www.phidgets.com/?prodid=969 PhidgetSBC] or [https://www.phidgets.com/?prodid=1143 Wireless VINT Phidget].&lt;br /&gt;
&lt;br /&gt;
==LabVIEW Libraries==&lt;br /&gt;
To develop on LabVIEW with Phidgets, you&#039;ll need the [https://www.phidgets.com/downloads/phidget22/libraries/any/Phidget22Labview.zip Phidgets LabVIEW Library]. &lt;br /&gt;
&lt;br /&gt;
Unpack the zip file into a folder and name the folder &#039;&#039;&#039;Phidgets&#039;&#039;&#039;. Then, move the folder into your LabVIEW directory:&lt;br /&gt;
* For 32-bit LabVIEW, &#039;&#039;&#039;C:/Program Files (x86)/National Instruments/LabVIEW 20xx/instr.lib&#039;&#039;&#039;&lt;br /&gt;
* For 64-bit LabVIEW, &#039;&#039;&#039;C:/Program Files/National Instruments/LabVIEW 20xx/instr.lib&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of LabVIEW installed, take care to ensure the library makes it into the correct version&#039;s instr.lib folder.&lt;br /&gt;
&lt;br /&gt;
[[Image:labview_directory2.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
From the 2026 Edition of LabVIEW and onward, you cannot run a VI if it contains sub VIs that are untrusted. You may see an error message like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:labview_trust_error.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
If this happens, click on &#039;&#039;&#039;&amp;quot;Manage Trusted Files&amp;quot;&#039;&#039;&#039; in the error list, or go to &#039;&#039;&#039;View -&amp;gt; Manage Trusted Files&#039;&#039;&#039; in the menu bar. &lt;br /&gt;
&lt;br /&gt;
[[Image:labview_trusted_files3.png|link=|center|800px]]&lt;br /&gt;
&lt;br /&gt;
Click the checkbox next to &amp;quot;Phidgets&amp;quot; to select all Phidgets VIs, and then click &#039;&#039;&#039;&amp;quot;Trust Selected Files&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;&amp;quot;Apply and Close&amp;quot;&#039;&#039;&#039;. The errors in the list should clear and you can now run your VI. &lt;br /&gt;
&lt;br /&gt;
==Development Environment Configuration==&lt;br /&gt;
===Using Our Examples===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
| Open LabVIEW and create a new VI. || [[File:Labview_newvi.png|center|350px|link=https://cdn.phidgets.com/docs/images/d/dd/Labview_newvi.png]]&lt;br /&gt;
|-&lt;br /&gt;
| In the new block diagram window, open the functions palette &amp;lt;br/&amp;gt;&#039;&#039;&#039;(View -&amp;gt; Functions Palette)&#039;&#039;&#039;. || [[File:Labview_functionspalette.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/a/a3/Labview_functionspalette.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| Next, go to the Phidgets palette &#039;&#039;&#039;(Instrument I/O -&amp;gt; Instrument Drivers -&amp;gt; Phidgets)&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| Next, select a palette that will work for your Phidget and drag &#039;&#039;&#039;VI Tree.vi&#039;&#039;&#039; onto your block diagram || [[File:Labview_vitree.png|center|350px|link=https://cdn.phidgets.com/docs/images/7/75/Labview_vitree.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Right-click on &#039;&#039;&#039;VI Tree.vi&#039;&#039;&#039; and select &#039;&#039;&#039;Open Front Panel&#039;&#039;&#039; || [[File:Labview_openfrontpanel.png|center|350px|link=https://cdn.phidgets.com/docs/images/9/9c/Labview_openfrontpanel.png]]&lt;br /&gt;
|-&lt;br /&gt;
| From the front panel, navigate to the block diagram &amp;lt;br/&amp;gt;&#039;&#039;&#039;(Window -&amp;gt; Show Block Diagram)&#039;&#039;&#039; || [[File:Labview_showblock.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/6b/Labview_showblock.png]]&lt;br /&gt;
|-&lt;br /&gt;
| The VI Tree Block Diagram lists all VIs available for its Phidget Class, and which subpalette to find them under. The examples are located near the bottom of the block diagram.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Right-click the example you would like to use and select &#039;&#039;&#039;Open Front Panel&#039;&#039;&#039; || [[File:Labview_runexample.png|center|350px|link=https://cdn.phidgets.com/docs/images/3/3d/Labview_runexample.png]]&lt;br /&gt;
|-&lt;br /&gt;
| When you are ready, press &#039;&#039;&#039;Run&#039;&#039;&#039; and the application will demonstrate the Phidget&#039;s functionality.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; Here is an example of an Accelerometer channel on a Spatial Phidget. || [[File:Labview_run.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/6/62/Labview_run.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| You should now have the example up and running for your device. Play around with the device and experiment with some of the functionality. When you are ready, the next step is configuring your environment and writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Configure Your Environment===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|You should now have the example up and running for your device. Play around with the device and experiment with some of the functionality. When you are ready, the next step is configuring your environment and writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
| First, we recommend enabling the &#039;&#039;&#039;Show constant labels&#039;&#039;&#039; setting in LabVIEW. This setting will reduce complexity when developing, and is especially recommended for beginners.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;To enable the setting, first navigate to Tools -&amp;gt; Options on your block diagram. || [[File:Labview_options.png|center|350px|link=https://cdn.phidgets.com/docs/images/0/0c/Labview_options.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Select the &#039;&#039;&#039;Environment&#039;&#039;&#039; category and enable &#039;&#039;&#039;Show created constant labels&#039;&#039;&#039; at the bottom. || [[File:Labview_showconstantlabels.png|center|350px|link=https://cdn.phidgets.com/docs/images/5/5e/Labview_showconstantlabels.png]]&lt;br /&gt;
|-&lt;br /&gt;
| To begin working with Phidgets, you will need both a &#039;&#039;&#039;StartPhidget&#039;&#039;&#039; VI and a &#039;&#039;&#039;ClosePhidget&#039;&#039;&#039; VI ||[[File:Labview_startclose.png|center|350px|link=https://cdn.phidgets.com/docs/images/7/7c/Labview_startclose.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Select a class that will work with your Phidget from the drop-down menu for each VI || [[File:Labview_selectclass.png|center|350px|link=https://cdn.phidgets.com/docs/images/4/4e/Labview_selectclass.png]]&lt;br /&gt;
|-&lt;br /&gt;
| You can now add device information or any initialization parameters to the StartPhidget VI. Using your mouse, hover over each of the connection nodes to see information about it || [[File:Labview_hover.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/67/Labview_hover.png]]&lt;br /&gt;
|-&lt;br /&gt;
| If you would like to add device information or initialization parameters, right-click the connection node and navigate to &#039;&#039;&#039;Create -&amp;gt; Constant&#039;&#039;&#039; or &#039;&#039;&#039;Create -&amp;gt; Control&#039;&#039;&#039; || [[File:Labview_createcontrol.png|center|350px|link=https://cdn.phidgets.com/docs/images/8/8e/Labview_createcontrol.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Creating a constant will allow you to modify device information from the block diagram || [[File:Labview_constant.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/d/dc/Labview_constant.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
| Creating a control will allow you to modify device information from the front panel. || [[File:Labview_control.png|center|350px|link=https://cdn.phidgets.com/docs/images/9/9b/Labview_control.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|The environment now has access to Phidgets. Next, we&#039;ll walk through writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Write Code===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| Along with this guide, you can use the [https://www.phidgets.com/?view=api Phidget22 API] and the VI help files as resources. Examples of more complex general topics such as using multiple Phidgets and connecting to a Phidget over the Network Server can be found under the VI Tree for the &#039;&#039;&#039;Phidget Common&#039;&#039;&#039; palette.&lt;br /&gt;
|-&lt;br /&gt;
| Most LabVIEW examples follow the same basic flow: starting a Phidget, reading some data, and closing the Phidget. || [[File:Digital_Input_Example.png|center|350px|link=https://cdn.phidgets.com/docs/images/1/18/Digital_Input_Example.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step One: Initialize, Open And Wait For Attachment Of The Phidget}}&lt;br /&gt;
|-&lt;br /&gt;
|The entire process of opening and initializing a Phidget can be done by using the version of &#039;&#039;&#039;StartPhidget.vi&#039;&#039;&#039; that corresponds to your device. In most cases, &#039;&#039;&#039;StartPhidget.vi&#039;&#039;&#039; will also attempt to wait for the first data to become available from the device for 5 seconds after initialization.||[[File:StartPhidget_VI.png|center|150px|link=https://cdn.phidgets.com/docs/images/2/2c/StartPhidget_VI.png]]&lt;br /&gt;
|-&lt;br /&gt;
| If you&#039;d prefer to initialize the device manually, you can use &#039;&#039;&#039;OpenPhidget.vi&#039;&#039;&#039; for your device and call the individual functions to set up the device. || [[File:OpenPhidgetVI.png|center|150px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step Two: Do Things With The Phidget}}&lt;br /&gt;
|-&lt;br /&gt;
|You can read data and interact with your Phidget both by polling it for its current state (or to set a state), or by catching events that trigger when the data changes.&amp;lt;br/&amp;gt;To poll devices, simply place the corresponding blocks as pictured. || [[File:LabVIEW_polling.png|center|350px|link=https://cdn.phidgets.com/docs/images/5/50/OpenPhidgetVI.png]]&lt;br /&gt;
|-&lt;br /&gt;
| To use events, there are three main blocks for each type, to create, execute, and close the event handler. When creating the event, all devices using an event of the same type must be grouped into an array to ensure the events get processed correctly. || [[File:Event_Array_grouping.png|center|150px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
| Once created, the events will be processed by &#039;&#039;&#039;[Name]EventExe.vi&#039;&#039;&#039;. When an event occurs, the pertinent information will be output, as well as information to reference which device caused it. ||[[File:Event_Exe.png|center|150px|link=https://cdn.phidgets.com/docs/images/7/74/Event_Array_grouping.png]]&lt;br /&gt;
|-&lt;br /&gt;
|After a program has run its course, the event handler must be closed. ||[[File:Event_Close.png|center|150px|link=https://cdn.phidgets.com/docs/images/3/31/Event_Close.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step Three: Close And Delete}}&lt;br /&gt;
|-&lt;br /&gt;
|Closing a Phidget is done by using the appropriate version of &#039;&#039;&#039;ClosePhidget.vi&#039;&#039;&#039;&amp;lt;br/&amp;gt;That&#039;s all the basic building blocks you need to create a LabVIEW program using Phidgets. ||[[File:Close_Phidget_VI.png|center|150px|link=https://cdn.phidgets.com/docs/images/3/31/Event_Close.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Help and Documentation}}&lt;br /&gt;
|-&lt;br /&gt;
|For more information on the use of any VI and its parameters, right-click the VI and select Help || [[File:Labview_help.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/61/Labview_help.png]]&lt;br /&gt;
|-&lt;br /&gt;
| This will take you to an HTML page outlining the function of the VI. This includes a list of all its parameters, which devices support them, their range of acceptable values, and their default values, where applicable. || [[File:Labview_help_page.png|center|350px|link=https://cdn.phidgets.com/docs/images/2/2d/Labview_help_page.png]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Phidget Programming Basics==&lt;br /&gt;
{{PhidgetProgrammingBasicsLink}}&lt;br /&gt;
&lt;br /&gt;
== LabVIEW Troubleshooting ==&lt;br /&gt;
{{LabVIEW_Troubleshooting}}&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Labview_trusted_files2.png&amp;diff=35696</id>
		<title>File:Labview trusted files2.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Labview_trusted_files2.png&amp;diff=35696"/>
		<updated>2026-08-06T19:56:14Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: Mparadis uploaded a new version of File:Labview trusted files2.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Labview_trusted_files2.png&amp;diff=35695</id>
		<title>File:Labview trusted files2.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Labview_trusted_files2.png&amp;diff=35695"/>
		<updated>2026-08-06T19:55:38Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Language_-_LabVIEW&amp;diff=35694</id>
		<title>Language - LabVIEW</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Language_-_LabVIEW&amp;diff=35694"/>
		<updated>2026-08-06T19:55:26Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#seo:|description=Learn how to use Phidget USB devices with LabVIEW.}}&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
&lt;br /&gt;
==Get Started==&lt;br /&gt;
With the Phidgets LabVIEW library, it&#039;s easy to create LabVIEW VIs that work with Phidget devices.&lt;br /&gt;
&lt;br /&gt;
Please note that the Phidget LabVIEW library doesn&#039;t support the [[Phidget Network Server]], so it won&#039;t be able to access Phidgets over the local network or make use of Phidgets connected to a [https://www.phidgets.com/?prodid=969 PhidgetSBC] or [https://www.phidgets.com/?prodid=1143 Wireless VINT Phidget].&lt;br /&gt;
&lt;br /&gt;
==LabVIEW Libraries==&lt;br /&gt;
To develop on LabVIEW with Phidgets, you&#039;ll need the [https://www.phidgets.com/downloads/phidget22/libraries/any/Phidget22Labview.zip Phidgets LabVIEW Library]. &lt;br /&gt;
&lt;br /&gt;
Unpack the zip file into a folder and name the folder &#039;&#039;&#039;Phidgets&#039;&#039;&#039;. Then, move the folder into your LabVIEW directory:&lt;br /&gt;
* For 32-bit LabVIEW, &#039;&#039;&#039;C:/Program Files (x86)/National Instruments/LabVIEW 20xx/instr.lib&#039;&#039;&#039;&lt;br /&gt;
* For 64-bit LabVIEW, &#039;&#039;&#039;C:/Program Files/National Instruments/LabVIEW 20xx/instr.lib&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of LabVIEW installed, take care to ensure the library makes it into the correct version&#039;s instr.lib folder.&lt;br /&gt;
&lt;br /&gt;
[[Image:labview_directory2.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
From the 2026 Edition of LabVIEW and onward, you cannot run a VI if it contains sub VIs that are untrusted. You may see an error message like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:labview_trust_error.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
If this happens, click on &#039;&#039;&#039;&amp;quot;Manage Trusted Files&amp;quot;&#039;&#039;&#039; in the error list, or go to &#039;&#039;&#039;View -&amp;gt; Manage Trusted Files&#039;&#039;&#039; in the menu bar. &lt;br /&gt;
&lt;br /&gt;
[[Image:labview_trusted_files2.png|link=|center|800px]]&lt;br /&gt;
&lt;br /&gt;
Click the checkbox next to &amp;quot;Phidgets&amp;quot; to select all Phidgets VIs, and then click &#039;&#039;&#039;&amp;quot;Trust Selected Files&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;&amp;quot;Apply and Close&amp;quot;&#039;&#039;&#039;. The errors in the list should clear and you can now run your VI. &lt;br /&gt;
&lt;br /&gt;
==Development Environment Configuration==&lt;br /&gt;
===Using Our Examples===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
| Open LabVIEW and create a new VI. || [[File:Labview_newvi.png|center|350px|link=https://cdn.phidgets.com/docs/images/d/dd/Labview_newvi.png]]&lt;br /&gt;
|-&lt;br /&gt;
| In the new block diagram window, open the functions palette &amp;lt;br/&amp;gt;&#039;&#039;&#039;(View -&amp;gt; Functions Palette)&#039;&#039;&#039;. || [[File:Labview_functionspalette.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/a/a3/Labview_functionspalette.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| Next, go to the Phidgets palette &#039;&#039;&#039;(Instrument I/O -&amp;gt; Instrument Drivers -&amp;gt; Phidgets)&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| Next, select a palette that will work for your Phidget and drag &#039;&#039;&#039;VI Tree.vi&#039;&#039;&#039; onto your block diagram || [[File:Labview_vitree.png|center|350px|link=https://cdn.phidgets.com/docs/images/7/75/Labview_vitree.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Right-click on &#039;&#039;&#039;VI Tree.vi&#039;&#039;&#039; and select &#039;&#039;&#039;Open Front Panel&#039;&#039;&#039; || [[File:Labview_openfrontpanel.png|center|350px|link=https://cdn.phidgets.com/docs/images/9/9c/Labview_openfrontpanel.png]]&lt;br /&gt;
|-&lt;br /&gt;
| From the front panel, navigate to the block diagram &amp;lt;br/&amp;gt;&#039;&#039;&#039;(Window -&amp;gt; Show Block Diagram)&#039;&#039;&#039; || [[File:Labview_showblock.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/6b/Labview_showblock.png]]&lt;br /&gt;
|-&lt;br /&gt;
| The VI Tree Block Diagram lists all VIs available for its Phidget Class, and which subpalette to find them under. The examples are located near the bottom of the block diagram.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Right-click the example you would like to use and select &#039;&#039;&#039;Open Front Panel&#039;&#039;&#039; || [[File:Labview_runexample.png|center|350px|link=https://cdn.phidgets.com/docs/images/3/3d/Labview_runexample.png]]&lt;br /&gt;
|-&lt;br /&gt;
| When you are ready, press &#039;&#039;&#039;Run&#039;&#039;&#039; and the application will demonstrate the Phidget&#039;s functionality.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; Here is an example of an Accelerometer channel on a Spatial Phidget. || [[File:Labview_run.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/6/62/Labview_run.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| You should now have the example up and running for your device. Play around with the device and experiment with some of the functionality. When you are ready, the next step is configuring your environment and writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Configure Your Environment===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|You should now have the example up and running for your device. Play around with the device and experiment with some of the functionality. When you are ready, the next step is configuring your environment and writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
| First, we recommend enabling the &#039;&#039;&#039;Show constant labels&#039;&#039;&#039; setting in LabVIEW. This setting will reduce complexity when developing, and is especially recommended for beginners.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;To enable the setting, first navigate to Tools -&amp;gt; Options on your block diagram. || [[File:Labview_options.png|center|350px|link=https://cdn.phidgets.com/docs/images/0/0c/Labview_options.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Select the &#039;&#039;&#039;Environment&#039;&#039;&#039; category and enable &#039;&#039;&#039;Show created constant labels&#039;&#039;&#039; at the bottom. || [[File:Labview_showconstantlabels.png|center|350px|link=https://cdn.phidgets.com/docs/images/5/5e/Labview_showconstantlabels.png]]&lt;br /&gt;
|-&lt;br /&gt;
| To begin working with Phidgets, you will need both a &#039;&#039;&#039;StartPhidget&#039;&#039;&#039; VI and a &#039;&#039;&#039;ClosePhidget&#039;&#039;&#039; VI ||[[File:Labview_startclose.png|center|350px|link=https://cdn.phidgets.com/docs/images/7/7c/Labview_startclose.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Select a class that will work with your Phidget from the drop-down menu for each VI || [[File:Labview_selectclass.png|center|350px|link=https://cdn.phidgets.com/docs/images/4/4e/Labview_selectclass.png]]&lt;br /&gt;
|-&lt;br /&gt;
| You can now add device information or any initialization parameters to the StartPhidget VI. Using your mouse, hover over each of the connection nodes to see information about it || [[File:Labview_hover.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/67/Labview_hover.png]]&lt;br /&gt;
|-&lt;br /&gt;
| If you would like to add device information or initialization parameters, right-click the connection node and navigate to &#039;&#039;&#039;Create -&amp;gt; Constant&#039;&#039;&#039; or &#039;&#039;&#039;Create -&amp;gt; Control&#039;&#039;&#039; || [[File:Labview_createcontrol.png|center|350px|link=https://cdn.phidgets.com/docs/images/8/8e/Labview_createcontrol.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Creating a constant will allow you to modify device information from the block diagram || [[File:Labview_constant.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/d/dc/Labview_constant.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
| Creating a control will allow you to modify device information from the front panel. || [[File:Labview_control.png|center|350px|link=https://cdn.phidgets.com/docs/images/9/9b/Labview_control.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|The environment now has access to Phidgets. Next, we&#039;ll walk through writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Write Code===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| Along with this guide, you can use the [https://www.phidgets.com/?view=api Phidget22 API] and the VI help files as resources. Examples of more complex general topics such as using multiple Phidgets and connecting to a Phidget over the Network Server can be found under the VI Tree for the &#039;&#039;&#039;Phidget Common&#039;&#039;&#039; palette.&lt;br /&gt;
|-&lt;br /&gt;
| Most LabVIEW examples follow the same basic flow: starting a Phidget, reading some data, and closing the Phidget. || [[File:Digital_Input_Example.png|center|350px|link=https://cdn.phidgets.com/docs/images/1/18/Digital_Input_Example.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step One: Initialize, Open And Wait For Attachment Of The Phidget}}&lt;br /&gt;
|-&lt;br /&gt;
|The entire process of opening and initializing a Phidget can be done by using the version of &#039;&#039;&#039;StartPhidget.vi&#039;&#039;&#039; that corresponds to your device. In most cases, &#039;&#039;&#039;StartPhidget.vi&#039;&#039;&#039; will also attempt to wait for the first data to become available from the device for 5 seconds after initialization.||[[File:StartPhidget_VI.png|center|150px|link=https://cdn.phidgets.com/docs/images/2/2c/StartPhidget_VI.png]]&lt;br /&gt;
|-&lt;br /&gt;
| If you&#039;d prefer to initialize the device manually, you can use &#039;&#039;&#039;OpenPhidget.vi&#039;&#039;&#039; for your device and call the individual functions to set up the device. || [[File:OpenPhidgetVI.png|center|150px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step Two: Do Things With The Phidget}}&lt;br /&gt;
|-&lt;br /&gt;
|You can read data and interact with your Phidget both by polling it for its current state (or to set a state), or by catching events that trigger when the data changes.&amp;lt;br/&amp;gt;To poll devices, simply place the corresponding blocks as pictured. || [[File:LabVIEW_polling.png|center|350px|link=https://cdn.phidgets.com/docs/images/5/50/OpenPhidgetVI.png]]&lt;br /&gt;
|-&lt;br /&gt;
| To use events, there are three main blocks for each type, to create, execute, and close the event handler. When creating the event, all devices using an event of the same type must be grouped into an array to ensure the events get processed correctly. || [[File:Event_Array_grouping.png|center|150px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
| Once created, the events will be processed by &#039;&#039;&#039;[Name]EventExe.vi&#039;&#039;&#039;. When an event occurs, the pertinent information will be output, as well as information to reference which device caused it. ||[[File:Event_Exe.png|center|150px|link=https://cdn.phidgets.com/docs/images/7/74/Event_Array_grouping.png]]&lt;br /&gt;
|-&lt;br /&gt;
|After a program has run its course, the event handler must be closed. ||[[File:Event_Close.png|center|150px|link=https://cdn.phidgets.com/docs/images/3/31/Event_Close.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step Three: Close And Delete}}&lt;br /&gt;
|-&lt;br /&gt;
|Closing a Phidget is done by using the appropriate version of &#039;&#039;&#039;ClosePhidget.vi&#039;&#039;&#039;&amp;lt;br/&amp;gt;That&#039;s all the basic building blocks you need to create a LabVIEW program using Phidgets. ||[[File:Close_Phidget_VI.png|center|150px|link=https://cdn.phidgets.com/docs/images/3/31/Event_Close.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Help and Documentation}}&lt;br /&gt;
|-&lt;br /&gt;
|For more information on the use of any VI and its parameters, right-click the VI and select Help || [[File:Labview_help.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/61/Labview_help.png]]&lt;br /&gt;
|-&lt;br /&gt;
| This will take you to an HTML page outlining the function of the VI. This includes a list of all its parameters, which devices support them, their range of acceptable values, and their default values, where applicable. || [[File:Labview_help_page.png|center|350px|link=https://cdn.phidgets.com/docs/images/2/2d/Labview_help_page.png]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Phidget Programming Basics==&lt;br /&gt;
{{PhidgetProgrammingBasicsLink}}&lt;br /&gt;
&lt;br /&gt;
== LabVIEW Troubleshooting ==&lt;br /&gt;
{{LabVIEW_Troubleshooting}}&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Language_-_LabVIEW&amp;diff=35693</id>
		<title>Language - LabVIEW</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Language_-_LabVIEW&amp;diff=35693"/>
		<updated>2026-08-06T19:53:45Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#seo:|description=Learn how to use Phidget USB devices with LabVIEW.}}&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
&lt;br /&gt;
==Get Started==&lt;br /&gt;
With the Phidgets LabVIEW library, it&#039;s easy to create LabVIEW VIs that work with Phidget devices.&lt;br /&gt;
&lt;br /&gt;
Please note that the Phidget LabVIEW library doesn&#039;t support the [[Phidget Network Server]], so it won&#039;t be able to access Phidgets over the local network or make use of Phidgets connected to a [https://www.phidgets.com/?prodid=969 PhidgetSBC] or [https://www.phidgets.com/?prodid=1143 Wireless VINT Phidget].&lt;br /&gt;
&lt;br /&gt;
==LabVIEW Libraries==&lt;br /&gt;
To develop on LabVIEW with Phidgets, you&#039;ll need the [https://www.phidgets.com/downloads/phidget22/libraries/any/Phidget22Labview.zip Phidgets LabVIEW Library]. &lt;br /&gt;
&lt;br /&gt;
Unpack the zip file into a folder and name the folder &#039;&#039;&#039;Phidgets&#039;&#039;&#039;. Then, move the folder into your LabVIEW directory:&lt;br /&gt;
* For 32-bit LabVIEW, &#039;&#039;&#039;C:/Program Files (x86)/National Instruments/LabVIEW 20xx/instr.lib&#039;&#039;&#039;&lt;br /&gt;
* For 64-bit LabVIEW, &#039;&#039;&#039;C:/Program Files/National Instruments/LabVIEW 20xx/instr.lib&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of LabVIEW installed, take care to ensure the library makes it into the correct version&#039;s instr.lib folder.&lt;br /&gt;
&lt;br /&gt;
[[Image:labview_directory2.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
From the 2026 Edition of LabVIEW and onward, you cannot run a VI if it contains sub VIs that are untrusted. You may see an error message like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:labview_trust_error.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
If this happens, click on &#039;&#039;&#039;&amp;quot;Manage Trusted Files&amp;quot;&#039;&#039;&#039; in the error list, or go to &#039;&#039;&#039;View -&amp;gt; Manage Trusted Files&#039;&#039;&#039; in the menu bar. &lt;br /&gt;
&lt;br /&gt;
[[Image:labview_trusted_files.png|link=|center|800px]]&lt;br /&gt;
&lt;br /&gt;
Click the checkbox next to &amp;quot;Phidgets&amp;quot; to select all Phidgets VIs, and then click &#039;&#039;&#039;&amp;quot;Trust Selected Files&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;&amp;quot;Apply and Close&amp;quot;&#039;&#039;&#039;. The errors in the list should clear and you can now run your VI. &lt;br /&gt;
&lt;br /&gt;
==Development Environment Configuration==&lt;br /&gt;
===Using Our Examples===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
| Open LabVIEW and create a new VI. || [[File:Labview_newvi.png|center|350px|link=https://cdn.phidgets.com/docs/images/d/dd/Labview_newvi.png]]&lt;br /&gt;
|-&lt;br /&gt;
| In the new block diagram window, open the functions palette &amp;lt;br/&amp;gt;&#039;&#039;&#039;(View -&amp;gt; Functions Palette)&#039;&#039;&#039;. || [[File:Labview_functionspalette.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/a/a3/Labview_functionspalette.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| Next, go to the Phidgets palette &#039;&#039;&#039;(Instrument I/O -&amp;gt; Instrument Drivers -&amp;gt; Phidgets)&#039;&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| Next, select a palette that will work for your Phidget and drag &#039;&#039;&#039;VI Tree.vi&#039;&#039;&#039; onto your block diagram || [[File:Labview_vitree.png|center|350px|link=https://cdn.phidgets.com/docs/images/7/75/Labview_vitree.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Right-click on &#039;&#039;&#039;VI Tree.vi&#039;&#039;&#039; and select &#039;&#039;&#039;Open Front Panel&#039;&#039;&#039; || [[File:Labview_openfrontpanel.png|center|350px|link=https://cdn.phidgets.com/docs/images/9/9c/Labview_openfrontpanel.png]]&lt;br /&gt;
|-&lt;br /&gt;
| From the front panel, navigate to the block diagram &amp;lt;br/&amp;gt;&#039;&#039;&#039;(Window -&amp;gt; Show Block Diagram)&#039;&#039;&#039; || [[File:Labview_showblock.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/6b/Labview_showblock.png]]&lt;br /&gt;
|-&lt;br /&gt;
| The VI Tree Block Diagram lists all VIs available for its Phidget Class, and which subpalette to find them under. The examples are located near the bottom of the block diagram.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Right-click the example you would like to use and select &#039;&#039;&#039;Open Front Panel&#039;&#039;&#039; || [[File:Labview_runexample.png|center|350px|link=https://cdn.phidgets.com/docs/images/3/3d/Labview_runexample.png]]&lt;br /&gt;
|-&lt;br /&gt;
| When you are ready, press &#039;&#039;&#039;Run&#039;&#039;&#039; and the application will demonstrate the Phidget&#039;s functionality.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; Here is an example of an Accelerometer channel on a Spatial Phidget. || [[File:Labview_run.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/6/62/Labview_run.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| You should now have the example up and running for your device. Play around with the device and experiment with some of the functionality. When you are ready, the next step is configuring your environment and writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Configure Your Environment===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|You should now have the example up and running for your device. Play around with the device and experiment with some of the functionality. When you are ready, the next step is configuring your environment and writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
| First, we recommend enabling the &#039;&#039;&#039;Show constant labels&#039;&#039;&#039; setting in LabVIEW. This setting will reduce complexity when developing, and is especially recommended for beginners.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;To enable the setting, first navigate to Tools -&amp;gt; Options on your block diagram. || [[File:Labview_options.png|center|350px|link=https://cdn.phidgets.com/docs/images/0/0c/Labview_options.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Select the &#039;&#039;&#039;Environment&#039;&#039;&#039; category and enable &#039;&#039;&#039;Show created constant labels&#039;&#039;&#039; at the bottom. || [[File:Labview_showconstantlabels.png|center|350px|link=https://cdn.phidgets.com/docs/images/5/5e/Labview_showconstantlabels.png]]&lt;br /&gt;
|-&lt;br /&gt;
| To begin working with Phidgets, you will need both a &#039;&#039;&#039;StartPhidget&#039;&#039;&#039; VI and a &#039;&#039;&#039;ClosePhidget&#039;&#039;&#039; VI ||[[File:Labview_startclose.png|center|350px|link=https://cdn.phidgets.com/docs/images/7/7c/Labview_startclose.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Select a class that will work with your Phidget from the drop-down menu for each VI || [[File:Labview_selectclass.png|center|350px|link=https://cdn.phidgets.com/docs/images/4/4e/Labview_selectclass.png]]&lt;br /&gt;
|-&lt;br /&gt;
| You can now add device information or any initialization parameters to the StartPhidget VI. Using your mouse, hover over each of the connection nodes to see information about it || [[File:Labview_hover.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/67/Labview_hover.png]]&lt;br /&gt;
|-&lt;br /&gt;
| If you would like to add device information or initialization parameters, right-click the connection node and navigate to &#039;&#039;&#039;Create -&amp;gt; Constant&#039;&#039;&#039; or &#039;&#039;&#039;Create -&amp;gt; Control&#039;&#039;&#039; || [[File:Labview_createcontrol.png|center|350px|link=https://cdn.phidgets.com/docs/images/8/8e/Labview_createcontrol.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Creating a constant will allow you to modify device information from the block diagram || [[File:Labview_constant.PNG|center|350px|link=https://cdn.phidgets.com/docs/images/d/dc/Labview_constant.PNG]]&lt;br /&gt;
|-&lt;br /&gt;
| Creating a control will allow you to modify device information from the front panel. || [[File:Labview_control.png|center|350px|link=https://cdn.phidgets.com/docs/images/9/9b/Labview_control.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|The environment now has access to Phidgets. Next, we&#039;ll walk through writing your own code.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Write Code===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| Along with this guide, you can use the [https://www.phidgets.com/?view=api Phidget22 API] and the VI help files as resources. Examples of more complex general topics such as using multiple Phidgets and connecting to a Phidget over the Network Server can be found under the VI Tree for the &#039;&#039;&#039;Phidget Common&#039;&#039;&#039; palette.&lt;br /&gt;
|-&lt;br /&gt;
| Most LabVIEW examples follow the same basic flow: starting a Phidget, reading some data, and closing the Phidget. || [[File:Digital_Input_Example.png|center|350px|link=https://cdn.phidgets.com/docs/images/1/18/Digital_Input_Example.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step One: Initialize, Open And Wait For Attachment Of The Phidget}}&lt;br /&gt;
|-&lt;br /&gt;
|The entire process of opening and initializing a Phidget can be done by using the version of &#039;&#039;&#039;StartPhidget.vi&#039;&#039;&#039; that corresponds to your device. In most cases, &#039;&#039;&#039;StartPhidget.vi&#039;&#039;&#039; will also attempt to wait for the first data to become available from the device for 5 seconds after initialization.||[[File:StartPhidget_VI.png|center|150px|link=https://cdn.phidgets.com/docs/images/2/2c/StartPhidget_VI.png]]&lt;br /&gt;
|-&lt;br /&gt;
| If you&#039;d prefer to initialize the device manually, you can use &#039;&#039;&#039;OpenPhidget.vi&#039;&#039;&#039; for your device and call the individual functions to set up the device. || [[File:OpenPhidgetVI.png|center|150px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step Two: Do Things With The Phidget}}&lt;br /&gt;
|-&lt;br /&gt;
|You can read data and interact with your Phidget both by polling it for its current state (or to set a state), or by catching events that trigger when the data changes.&amp;lt;br/&amp;gt;To poll devices, simply place the corresponding blocks as pictured. || [[File:LabVIEW_polling.png|center|350px|link=https://cdn.phidgets.com/docs/images/5/50/OpenPhidgetVI.png]]&lt;br /&gt;
|-&lt;br /&gt;
| To use events, there are three main blocks for each type, to create, execute, and close the event handler. When creating the event, all devices using an event of the same type must be grouped into an array to ensure the events get processed correctly. || [[File:Event_Array_grouping.png|center|150px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
| Once created, the events will be processed by &#039;&#039;&#039;[Name]EventExe.vi&#039;&#039;&#039;. When an event occurs, the pertinent information will be output, as well as information to reference which device caused it. ||[[File:Event_Exe.png|center|150px|link=https://cdn.phidgets.com/docs/images/7/74/Event_Array_grouping.png]]&lt;br /&gt;
|-&lt;br /&gt;
|After a program has run its course, the event handler must be closed. ||[[File:Event_Close.png|center|150px|link=https://cdn.phidgets.com/docs/images/3/31/Event_Close.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Step Three: Close And Delete}}&lt;br /&gt;
|-&lt;br /&gt;
|Closing a Phidget is done by using the appropriate version of &#039;&#039;&#039;ClosePhidget.vi&#039;&#039;&#039;&amp;lt;br/&amp;gt;That&#039;s all the basic building blocks you need to create a LabVIEW program using Phidgets. ||[[File:Close_Phidget_VI.png|center|150px|link=https://cdn.phidgets.com/docs/images/3/31/Event_Close.png]]&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;| {{hiddenh4|Help and Documentation}}&lt;br /&gt;
|-&lt;br /&gt;
|For more information on the use of any VI and its parameters, right-click the VI and select Help || [[File:Labview_help.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/61/Labview_help.png]]&lt;br /&gt;
|-&lt;br /&gt;
| This will take you to an HTML page outlining the function of the VI. This includes a list of all its parameters, which devices support them, their range of acceptable values, and their default values, where applicable. || [[File:Labview_help_page.png|center|350px|link=https://cdn.phidgets.com/docs/images/2/2d/Labview_help_page.png]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Phidget Programming Basics==&lt;br /&gt;
{{PhidgetProgrammingBasicsLink}}&lt;br /&gt;
&lt;br /&gt;
== LabVIEW Troubleshooting ==&lt;br /&gt;
{{LabVIEW_Troubleshooting}}&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Labview_trusted_files.png&amp;diff=35692</id>
		<title>File:Labview trusted files.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Labview_trusted_files.png&amp;diff=35692"/>
		<updated>2026-08-06T19:52:00Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Labview_trust_error.png&amp;diff=35691</id>
		<title>File:Labview trust error.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Labview_trust_error.png&amp;diff=35691"/>
		<updated>2026-08-06T19:51:49Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=TMP1202_Quick_Start_Guide&amp;diff=35686</id>
		<title>TMP1202 Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=TMP1202_Quick_Start_Guide&amp;diff=35686"/>
		<updated>2026-06-24T19:37:13Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: Created page with &amp;quot;__NOINDEX__ __NOTOC__ {{#seo:|description=Get started with your RTD Phidget}}  ==Part 1: Setup== {{PT1 Deck Sequence}}  ==Part 2: Using Your Phidget== ===Connections Overview=== center  {| | &amp;#039;&amp;#039;&amp;#039;VINT Port&amp;#039;&amp;#039;&amp;#039; || This device is controlled through a [https://www.phidgets.com/?tier=2&amp;amp;catid=64&amp;amp;pcid=57 VINT Hub Phidget]. |- | &amp;#039;&amp;#039;&amp;#039;EXC+&amp;#039;&amp;#039;&amp;#039; || Power line for the RTD (usually red) |- | &amp;#039;&amp;#039;&amp;#039;RTD+&amp;#039;&amp;#039;&amp;#039; || Positive measurement line for the RTD (choo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOINDEX__&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{#seo:|description=Get started with your RTD Phidget}}&lt;br /&gt;
&lt;br /&gt;
==Part 1: Setup==&lt;br /&gt;
{{PT1 Deck Sequence}}&lt;br /&gt;
&lt;br /&gt;
==Part 2: Using Your Phidget==&lt;br /&gt;
===Connections Overview===&lt;br /&gt;
[[Image:TMP1202_Wiring.png|600px|link=|center]]&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| &#039;&#039;&#039;VINT Port&#039;&#039;&#039; || This device is controlled through a [https://www.phidgets.com/?tier=2&amp;amp;catid=64&amp;amp;pcid=57 VINT Hub Phidget].&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;EXC+&#039;&#039;&#039; || Power line for the RTD (usually red)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;RTD+&#039;&#039;&#039; || Positive measurement line for the RTD (choose the same color as EXC+)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;RTD-&#039;&#039;&#039; || Negative measurement line for the RTD (choose the same color as EXC-)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;EXC-&#039;&#039;&#039; || Ground line (usually black or silver)&lt;br /&gt;
|-&lt;br /&gt;
| ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Phidget Control Panel===&lt;br /&gt;
Use the Phidget Control Panel to explore your device&#039;s functionality. Each channel is described below.&lt;br /&gt;
&lt;br /&gt;
[[Image:TMP1202_ControlPanel.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{UGC-Start}}&lt;br /&gt;
&lt;br /&gt;
{{UGC-Entry|Resistance Input||&lt;br /&gt;
===Resistance Input===&lt;br /&gt;
[[Image:TMP1202_ControlPanel_ResInputExample.png|link=|thumb|500px|&amp;lt;center&amp;gt;&#039;&#039;Resistance Input application - Phidget Control Panel (Windows)&#039;&#039;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
* The Data Interval, Change Trigger, and Wire Setup can be configured (see Part 4 for details). &lt;br /&gt;
* The probe resistance in ohms is displayed on the right.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{UGC-Entry|RTD Input||&lt;br /&gt;
[[Image:TMP1202_ControlPanel_RTDInputExample.png|link=|thumb|500px|&amp;lt;center&amp;gt;&#039;&#039;RTD Input application - Phidget Control Panel (Windows)&#039;&#039;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
===RTD Input===&lt;br /&gt;
* The Data Interval, Change Trigger, Probe Type and Wire Setup can be configured (see Part 4 for details). &lt;br /&gt;
* The probe temperature in degrees Celsius is displayed on the right.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{UGC-End}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{UG-Part3}}&lt;br /&gt;
&lt;br /&gt;
==Part 4: Other Considerations ==&lt;br /&gt;
&lt;br /&gt;
{{UGC-Start}}&lt;br /&gt;
{{UGC-Addressing}}&lt;br /&gt;
{{UGC-DataInterval}}&lt;br /&gt;
{{UGC-Graphing}}&lt;br /&gt;
{{UGC-Firmware}}&lt;br /&gt;
{{UGC-Shield}}&lt;br /&gt;
{{UGC-Entry|Wiring Instructions||&lt;br /&gt;
===Two-Wire Mode===&lt;br /&gt;
&lt;br /&gt;
[[Image:TMP1200-2wire.jpg|link=|350px|right]]&lt;br /&gt;
&lt;br /&gt;
This is the simplest wiring setup for an RTD, but also the least accurate because the resistance of the leads are not taken into account. To connect a 2-wire RTD to the RTD Phidget, connect one wire to the RTD+ terminal, and the other to the RTD- terminal. Then connect the EXC+ terminal to the RTD+ terminal and the EXC- to the RTD- terminal with two short wires.&lt;br /&gt;
&lt;br /&gt;
In your program, set {{Code|RTDWireSetup}} to 2-wire mode. In the {{Phidget22 API}} select the TMP1200 and your programming language of choice to see exact naming conventions.&lt;br /&gt;
&lt;br /&gt;
===Three-Wire Mode===&lt;br /&gt;
&lt;br /&gt;
[[Image:TMP1200-3wire.jpg|link=|350px|right]]&lt;br /&gt;
&lt;br /&gt;
In a three-wire RTD, the extra wire is added to measure the resistance of one of the leads. This calculation assumes that both leads have the same resistance. Your RTD should have two wires that share a color; connect one of these wires to the RTD- terminal and the other to the EXC- terminal. The differently colored wire connects to the RTD+ terminal. Then connect the EXC+ terminal to the RTD+ terminal with a short wire.&lt;br /&gt;
&lt;br /&gt;
In your program, set {{Code|RTDWireSetup}} to 3-wire mode. In the {{Phidget22 API}} select the TMP1200 and your programming language of choice to see exact naming conventions.&lt;br /&gt;
&lt;br /&gt;
===Four-Wire Mode===&lt;br /&gt;
&lt;br /&gt;
[[Image:TMP1200-4wire.jpg|link=|350px|right]]&lt;br /&gt;
&lt;br /&gt;
A four-wire RTD is normally used in precision measurement, when the assumption that both leads have the same resistance is not accurate enough. Unfortunately the RTD Phidget does not support this particular feature of four-wire RTDs. It does support the use of four-wire RTDs using the same assumption as three-wire mode. To connect a four-wire RTD, simply connect one pair of same-colored wires to the RTD+ and EXC+ terminals, and the other pair to the RTD- and EXC- terminals.&lt;br /&gt;
&lt;br /&gt;
In your program, set {{Code|RTDWireSetup}} to 4-wire mode. In the {{Phidget22 API}} select the TMP1200 and your programming language of choice to see exact naming conventions.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
{{UGC-Entry|Line Resistance Measurement||&lt;br /&gt;
In three and four wire modes, this device will measure the line resistance every 5 minutes. This measurement will cause a delay in measurement for data intervals of less than 500ms. To force the line resistance to be recalculated, you must close and re-open the device.&lt;br /&gt;
}}&lt;br /&gt;
{{UGC-End}}&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:TMP1202_ControlPanel_RTDInputExample.png&amp;diff=35685</id>
		<title>File:TMP1202 ControlPanel RTDInputExample.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:TMP1202_ControlPanel_RTDInputExample.png&amp;diff=35685"/>
		<updated>2026-06-24T19:37:01Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:TMP1202_ControlPanel_ResInputExample.png&amp;diff=35684</id>
		<title>File:TMP1202 ControlPanel ResInputExample.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:TMP1202_ControlPanel_ResInputExample.png&amp;diff=35684"/>
		<updated>2026-06-24T19:36:49Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:TMP1202_ControlPanel.png&amp;diff=35683</id>
		<title>File:TMP1202 ControlPanel.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:TMP1202_ControlPanel.png&amp;diff=35683"/>
		<updated>2026-06-24T19:36:37Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:TMP1202_Wiring.png&amp;diff=35682</id>
		<title>File:TMP1202 Wiring.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:TMP1202_Wiring.png&amp;diff=35682"/>
		<updated>2026-06-24T19:36:27Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Using_XLights_with_Phidgets&amp;diff=35680</id>
		<title>Using XLights with Phidgets</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Using_XLights_with_Phidgets&amp;diff=35680"/>
		<updated>2026-06-10T22:23:16Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: Mparadis moved page Using XLights with Phidgets to Using xLights with Phidgets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Using xLights with Phidgets]]&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Using_xLights_with_Phidgets&amp;diff=35679</id>
		<title>Using xLights with Phidgets</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Using_xLights_with_Phidgets&amp;diff=35679"/>
		<updated>2026-06-10T22:23:15Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: Mparadis moved page Using XLights with Phidgets to Using xLights with Phidgets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Project]]&lt;br /&gt;
{{TOC limit|3}}&lt;br /&gt;
{{#seo:|keywords=xLights, ws2812, christmas lights}}&lt;br /&gt;
{{#seo:|description=Learn how to use a Phidgets addressable LED controller with xLights software.}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
[[Image:xLights.png|400px|thumb|link=]]&lt;br /&gt;
xLights is a free and open-source comprehensive light control platform that helps create small or large light displays quickly, without the need for coding. This guide will walk you through how to add the Addressable LED Phidget as a controller in xLights. &lt;br /&gt;
&lt;br /&gt;
== Demonstration ==&lt;br /&gt;
&amp;lt;center&amp;gt;{{#ev:youtube|G6JIiXuTe18|rel=0}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
This project uses the following parts:&lt;br /&gt;
* [{{SERVER}}/?prodid=969 PhidgetSBC4 (SBC3003_0)]&lt;br /&gt;
* [{{SERVER}}/?prodid=1368 Addressable LED Phidget (LED0100_0)]&lt;br /&gt;
* [{{SERVER}}/?tier=2&amp;amp;catid=28&amp;amp;pcid=24 USB Cable]&lt;br /&gt;
* [{{SERVER}}/?tier=1&amp;amp;catid=61&amp;amp;pcid=54 12V Power Supply for PhidgetSBC]&lt;br /&gt;
* [{{SERVER}}/?prodid=1011&amp;amp;pcid=77 Ethernet cable]&lt;br /&gt;
* 16x16 Addressable LED Array&lt;br /&gt;
* 5V 3.5A Power Supply for LEDs&lt;br /&gt;
* Windows, macOS or Linux computer&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
[[Image:xL_setup.png|link=|700px]]&lt;br /&gt;
&lt;br /&gt;
Assemble the system following these steps:&lt;br /&gt;
* Connect your LED array to the Addressable LED Phidget&lt;br /&gt;
* Connect the Addressable LED Phidget to the PhidgetSBC4 using a USB cable&lt;br /&gt;
* Connect the PhidgetSBC4 to your network router or switch with an ethernet cable&lt;br /&gt;
* Connect the 12V power supply to the PhidgetSBC&lt;br /&gt;
* Connect the LED power supply to the Addressable LED Phidget. Here, our LED array requires 5V.&lt;br /&gt;
&lt;br /&gt;
== Server Setup ==&lt;br /&gt;
&lt;br /&gt;
=== SBC Web Configuration ===&lt;br /&gt;
In this project, we&#039;ll be using a client (our desktop computer) and a server (the PhidgetSBC4). &lt;br /&gt;
&lt;br /&gt;
To start, we need prepare the PhidgetSBC4 with the required packages and configurations. Log into the SBC&#039;s web interface by double clicking on its control panel entry:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_controlpanel.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Next, follow these steps:&lt;br /&gt;
#Log in and navigate to &#039;&#039;&#039;System -&amp;gt; Packages&#039;&#039;&#039;. &lt;br /&gt;
#Install the &#039;&#039;&#039;C/C++ Development Tools/Headers&#039;&#039;&#039;. &lt;br /&gt;
#&#039;&#039;&#039;Refresh Available Packages&#039;&#039;&#039; and &#039;&#039;&#039;Upgrade All Packages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_packages.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, go to &#039;&#039;&#039;Network -&amp;gt; Settings&#039;&#039;&#039; and enable the SSH server if it isn&#039;t already enabled.&lt;br /&gt;
&lt;br /&gt;
=== Installing the Server ===&lt;br /&gt;
&lt;br /&gt;
Now that SSH is enabled, we can remote in with SSH software (we recommend  [https://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]). Or, you can plug a monitor and keyboard into the SBC4 and complete the rest of this section in the terminal directly.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t already have &#039;&#039;&#039;git&#039;&#039;&#039; installed, you can get it with the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t already have the &#039;&#039;&#039;make&#039;&#039;&#039; command installed, you can get it with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
apt install build-essential&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to &#039;&#039;&#039;/usr/userapps/&#039;&#039;&#039; (you&#039;ll have to create the userapps directory if this is the first project on this SBC) and use the following command to download the server project files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
git clone https://github.com/PhidgetsInc/openpixelcontrol-ph22.git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All of the files and folders for the server code will be added in a folder named &#039;&#039;&#039;openpixelcontrol-ph22&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re not experienced with the terminal, we recommend switching back to the SBC web interface at this point. Go to the &#039;&#039;&#039;Projects&#039;&#039;&#039; tab and you should see the project folder. Click on the folder to open it.&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_project1.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Scroll down and click the &#039;&#039;&#039;make&#039;&#039;&#039; button to build the project.&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_make.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Once it&#039;s done building you can test the server by returning to your SSH terminal and typing &#039;&#039;&#039;./bin/Phidget_server&#039;&#039;&#039; from the project folder. If it&#039;s successful, you should see this:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_serverRunning.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Once the server is running, we can configure our client.&lt;br /&gt;
&lt;br /&gt;
== Client Setup ==&lt;br /&gt;
&lt;br /&gt;
To begin, install [https://xlights.org/ xLights] on your client computer.&lt;br /&gt;
&lt;br /&gt;
=== Controller Configuration ===&lt;br /&gt;
&lt;br /&gt;
Open xLights and add a new ethernet controller under the controllers tab:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_controller.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Protocol&#039;&#039;&#039; should be set to &#039;OPC&#039;.&lt;br /&gt;
* The &#039;&#039;&#039;Message Data Size&#039;&#039;&#039; should be equal to the number of LEDs in your display multiplied by the number of color channels. This project uses a 16x16 grid of RGB lights, so the data size is 768. For a strand of 100 RGBW lights, the data size would be 400.&lt;br /&gt;
* The &#039;&#039;&#039;IP address&#039;&#039;&#039; needs to be set to the SBC&#039;s IP, which you can find in the Phidget Control Panel:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_IP.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
=== Layout Configuration ===&lt;br /&gt;
&lt;br /&gt;
The layout lets you accurately model your lights in xLights. For a simple LED strip click on &amp;quot;Single Line&amp;quot;, and for a grid, use &amp;quot;Matrix&amp;quot;. Then click and drag in the black space to create the model.&lt;br /&gt;
[[Image:xL_layout.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Once it&#039;s created, click on your model to access the options.&lt;br /&gt;
[[Image:xL_layoutOptions.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
We won&#039;t be going in depth on all the layout options in this article, but you can find more information in xLights&#039; official documentation. For now, the important thing is to select &#039;&#039;&#039;Use Start Channel&#039;&#039;&#039; for the controller. Next, click on start channel and click on the &#039;...&#039; that appears. For &#039;&#039;&#039;Universe number&#039;&#039;&#039; select the IP address of the SBC. &lt;br /&gt;
[[Image:xL_universe.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
In order to have our 16x16 grid display properly, the Strings, Nodes/String, and Strands/String must be set to 4, 64, and 4. This is because the LEDs are laid out in a zig-zag pattern. If you&#039;re using a strip, you can just set it to 1, N, 1, where N is the number of lights in your strip.&lt;br /&gt;
&lt;br /&gt;
=== Sequencer ===&lt;br /&gt;
&lt;br /&gt;
Once your controller and layout are set up, you can move to the sequencer tab and do &#039;&#039;&#039;File -&amp;gt; New Sequence&#039;&#039;&#039;. Select &#039;Animation&#039;, &#039;40fps&#039;, and &#039;Quick Start&#039;. &lt;br /&gt;
&lt;br /&gt;
Now you can choose one of the effects from the effects bar and drag it into the row in the timeline corresponding to the layout you created. Drag it out so it lasts longer than a few seconds. Click on the play button, and you should see the effect play out on the preview in the bottom left. You can play with the Effect Settings and Colors windows to customize the effect.&lt;br /&gt;
[[Image:xL_timeline.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Further details on creating sequences fall outside of the scope of this article, but you can see the official xLights documentation for more information. &lt;br /&gt;
&lt;br /&gt;
Now that your sequence is set up, you can click the lightbulb icon to attempt to connect to the SBC&#039;s server.&lt;br /&gt;
[[Image:xL_bulb.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
If it&#039;s successful, you&#039;ll see the IP address of your client appear in your SSH terminal:&lt;br /&gt;
[[Image:xL_sshConnect.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
When you hit play, you should see your lights activate.&lt;br /&gt;
&lt;br /&gt;
[[Image:animation.gif|link=|center]]&lt;br /&gt;
&lt;br /&gt;
== Running the Project on Boot ==&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve confirmed the server and client work using SSH or a local terminal, we can set the program to launch on boot as a daemon.&lt;br /&gt;
&lt;br /&gt;
Open the SBC web interface again and navigate to your project. Scroll down to &#039;&#039;&#039;Startup Settings&#039;&#039;&#039; and enable it, selecting &#039;&#039;&#039;bin/Phidget_server&#039;&#039;&#039; as the executable and clicking the save button below.&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_startup.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
The next time you power cycle the SBC, the server will run and you should be able to connect with your xLights client.&lt;br /&gt;
&lt;br /&gt;
== Running Autonomously on the SBC ==&lt;br /&gt;
&lt;br /&gt;
You may find that having a second computer running the xLights app 24/7 is a bit overkill for the size and scope of your project. If you just want the SBC to run a few patterns on a loop all by itself, but you still want to use xLights to design the pattern, you can have the SBC act as both client and server for the OPC stream.&lt;br /&gt;
&lt;br /&gt;
Open an SSH connection and go back to the /userapps/ directory on your SBC. Run the following command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
git clone https://github.com/PhidgetsInc/opcdecode-ph22.git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires &#039;&#039;&#039;libzstd&#039;&#039;&#039; to run. Install it with the following command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
apt install libzstd-dev&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a second project visible in the SBC web interface:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_project2.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Click on openpixelcontrol-ph22 and start the project:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_startProj.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Then go back and do the same for opcdecode-ph22. You should see your lights turn on and display the default pattern.&lt;br /&gt;
&lt;br /&gt;
You can now configure both projects to run on boot as we did in the previous section, which will cause the pattern to display autonomously on boot, even if the SBC isn&#039;t connected to any network. You can design and save your own sequence in xLights and copy the .fseq file to the SBC to customize the pattern.&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Using_xLights_with_Phidgets&amp;diff=35678</id>
		<title>Using xLights with Phidgets</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Using_xLights_with_Phidgets&amp;diff=35678"/>
		<updated>2026-06-10T22:11:43Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: Created page with &amp;quot;Category: Project {{TOC limit|3}} {{#seo:|keywords=xLights, ws2812, christmas lights}} {{#seo:|description=Learn how to use a Phidgets addressable LED controller with xLights software.}} ==Introduction== link= xLights is a free and open-source comprehensive light control platform that helps create small or large light displays quickly, without the need for coding. This guide will walk you through how to add the Addressable LED Phidge...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Project]]&lt;br /&gt;
{{TOC limit|3}}&lt;br /&gt;
{{#seo:|keywords=xLights, ws2812, christmas lights}}&lt;br /&gt;
{{#seo:|description=Learn how to use a Phidgets addressable LED controller with xLights software.}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
[[Image:xLights.png|400px|thumb|link=]]&lt;br /&gt;
xLights is a free and open-source comprehensive light control platform that helps create small or large light displays quickly, without the need for coding. This guide will walk you through how to add the Addressable LED Phidget as a controller in xLights. &lt;br /&gt;
&lt;br /&gt;
== Demonstration ==&lt;br /&gt;
&amp;lt;center&amp;gt;{{#ev:youtube|G6JIiXuTe18|rel=0}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Hardware==&lt;br /&gt;
This project uses the following parts:&lt;br /&gt;
* [{{SERVER}}/?prodid=969 PhidgetSBC4 (SBC3003_0)]&lt;br /&gt;
* [{{SERVER}}/?prodid=1368 Addressable LED Phidget (LED0100_0)]&lt;br /&gt;
* [{{SERVER}}/?tier=2&amp;amp;catid=28&amp;amp;pcid=24 USB Cable]&lt;br /&gt;
* [{{SERVER}}/?tier=1&amp;amp;catid=61&amp;amp;pcid=54 12V Power Supply for PhidgetSBC]&lt;br /&gt;
* [{{SERVER}}/?prodid=1011&amp;amp;pcid=77 Ethernet cable]&lt;br /&gt;
* 16x16 Addressable LED Array&lt;br /&gt;
* 5V 3.5A Power Supply for LEDs&lt;br /&gt;
* Windows, macOS or Linux computer&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
[[Image:xL_setup.png|link=|700px]]&lt;br /&gt;
&lt;br /&gt;
Assemble the system following these steps:&lt;br /&gt;
* Connect your LED array to the Addressable LED Phidget&lt;br /&gt;
* Connect the Addressable LED Phidget to the PhidgetSBC4 using a USB cable&lt;br /&gt;
* Connect the PhidgetSBC4 to your network router or switch with an ethernet cable&lt;br /&gt;
* Connect the 12V power supply to the PhidgetSBC&lt;br /&gt;
* Connect the LED power supply to the Addressable LED Phidget. Here, our LED array requires 5V.&lt;br /&gt;
&lt;br /&gt;
== Server Setup ==&lt;br /&gt;
&lt;br /&gt;
=== SBC Web Configuration ===&lt;br /&gt;
In this project, we&#039;ll be using a client (our desktop computer) and a server (the PhidgetSBC4). &lt;br /&gt;
&lt;br /&gt;
To start, we need prepare the PhidgetSBC4 with the required packages and configurations. Log into the SBC&#039;s web interface by double clicking on its control panel entry:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_controlpanel.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Next, follow these steps:&lt;br /&gt;
#Log in and navigate to &#039;&#039;&#039;System -&amp;gt; Packages&#039;&#039;&#039;. &lt;br /&gt;
#Install the &#039;&#039;&#039;C/C++ Development Tools/Headers&#039;&#039;&#039;. &lt;br /&gt;
#&#039;&#039;&#039;Refresh Available Packages&#039;&#039;&#039; and &#039;&#039;&#039;Upgrade All Packages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_packages.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, go to &#039;&#039;&#039;Network -&amp;gt; Settings&#039;&#039;&#039; and enable the SSH server if it isn&#039;t already enabled.&lt;br /&gt;
&lt;br /&gt;
=== Installing the Server ===&lt;br /&gt;
&lt;br /&gt;
Now that SSH is enabled, we can remote in with SSH software (we recommend  [https://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]). Or, you can plug a monitor and keyboard into the SBC4 and complete the rest of this section in the terminal directly.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t already have &#039;&#039;&#039;git&#039;&#039;&#039; installed, you can get it with the following commands:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t already have the &#039;&#039;&#039;make&#039;&#039;&#039; command installed, you can get it with:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
apt install build-essential&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to &#039;&#039;&#039;/usr/userapps/&#039;&#039;&#039; (you&#039;ll have to create the userapps directory if this is the first project on this SBC) and use the following command to download the server project files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
git clone https://github.com/PhidgetsInc/openpixelcontrol-ph22.git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All of the files and folders for the server code will be added in a folder named &#039;&#039;&#039;openpixelcontrol-ph22&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re not experienced with the terminal, we recommend switching back to the SBC web interface at this point. Go to the &#039;&#039;&#039;Projects&#039;&#039;&#039; tab and you should see the project folder. Click on the folder to open it.&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_project1.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Scroll down and click the &#039;&#039;&#039;make&#039;&#039;&#039; button to build the project.&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_make.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Once it&#039;s done building you can test the server by returning to your SSH terminal and typing &#039;&#039;&#039;./bin/Phidget_server&#039;&#039;&#039; from the project folder. If it&#039;s successful, you should see this:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_serverRunning.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Once the server is running, we can configure our client.&lt;br /&gt;
&lt;br /&gt;
== Client Setup ==&lt;br /&gt;
&lt;br /&gt;
To begin, install [https://xlights.org/ xLights] on your client computer.&lt;br /&gt;
&lt;br /&gt;
=== Controller Configuration ===&lt;br /&gt;
&lt;br /&gt;
Open xLights and add a new ethernet controller under the controllers tab:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_controller.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;&#039;Protocol&#039;&#039;&#039; should be set to &#039;OPC&#039;.&lt;br /&gt;
* The &#039;&#039;&#039;Message Data Size&#039;&#039;&#039; should be equal to the number of LEDs in your display multiplied by the number of color channels. This project uses a 16x16 grid of RGB lights, so the data size is 768. For a strand of 100 RGBW lights, the data size would be 400.&lt;br /&gt;
* The &#039;&#039;&#039;IP address&#039;&#039;&#039; needs to be set to the SBC&#039;s IP, which you can find in the Phidget Control Panel:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_IP.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
=== Layout Configuration ===&lt;br /&gt;
&lt;br /&gt;
The layout lets you accurately model your lights in xLights. For a simple LED strip click on &amp;quot;Single Line&amp;quot;, and for a grid, use &amp;quot;Matrix&amp;quot;. Then click and drag in the black space to create the model.&lt;br /&gt;
[[Image:xL_layout.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Once it&#039;s created, click on your model to access the options.&lt;br /&gt;
[[Image:xL_layoutOptions.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
We won&#039;t be going in depth on all the layout options in this article, but you can find more information in xLights&#039; official documentation. For now, the important thing is to select &#039;&#039;&#039;Use Start Channel&#039;&#039;&#039; for the controller. Next, click on start channel and click on the &#039;...&#039; that appears. For &#039;&#039;&#039;Universe number&#039;&#039;&#039; select the IP address of the SBC. &lt;br /&gt;
[[Image:xL_universe.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
In order to have our 16x16 grid display properly, the Strings, Nodes/String, and Strands/String must be set to 4, 64, and 4. This is because the LEDs are laid out in a zig-zag pattern. If you&#039;re using a strip, you can just set it to 1, N, 1, where N is the number of lights in your strip.&lt;br /&gt;
&lt;br /&gt;
=== Sequencer ===&lt;br /&gt;
&lt;br /&gt;
Once your controller and layout are set up, you can move to the sequencer tab and do &#039;&#039;&#039;File -&amp;gt; New Sequence&#039;&#039;&#039;. Select &#039;Animation&#039;, &#039;40fps&#039;, and &#039;Quick Start&#039;. &lt;br /&gt;
&lt;br /&gt;
Now you can choose one of the effects from the effects bar and drag it into the row in the timeline corresponding to the layout you created. Drag it out so it lasts longer than a few seconds. Click on the play button, and you should see the effect play out on the preview in the bottom left. You can play with the Effect Settings and Colors windows to customize the effect.&lt;br /&gt;
[[Image:xL_timeline.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Further details on creating sequences fall outside of the scope of this article, but you can see the official xLights documentation for more information. &lt;br /&gt;
&lt;br /&gt;
Now that your sequence is set up, you can click the lightbulb icon to attempt to connect to the SBC&#039;s server.&lt;br /&gt;
[[Image:xL_bulb.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
If it&#039;s successful, you&#039;ll see the IP address of your client appear in your SSH terminal:&lt;br /&gt;
[[Image:xL_sshConnect.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
When you hit play, you should see your lights activate.&lt;br /&gt;
&lt;br /&gt;
[[Image:animation.gif|link=|center]]&lt;br /&gt;
&lt;br /&gt;
== Running the Project on Boot ==&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve confirmed the server and client work using SSH or a local terminal, we can set the program to launch on boot as a daemon.&lt;br /&gt;
&lt;br /&gt;
Open the SBC web interface again and navigate to your project. Scroll down to &#039;&#039;&#039;Startup Settings&#039;&#039;&#039; and enable it, selecting &#039;&#039;&#039;bin/Phidget_server&#039;&#039;&#039; as the executable and clicking the save button below.&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_startup.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
The next time you power cycle the SBC, the server will run and you should be able to connect with your xLights client.&lt;br /&gt;
&lt;br /&gt;
== Running Autonomously on the SBC ==&lt;br /&gt;
&lt;br /&gt;
You may find that having a second computer running the xLights app 24/7 is a bit overkill for the size and scope of your project. If you just want the SBC to run a few patterns on a loop all by itself, but you still want to use xLights to design the pattern, you can have the SBC act as both client and server for the OPC stream.&lt;br /&gt;
&lt;br /&gt;
Open an SSH connection and go back to the /userapps/ directory on your SBC. Run the following command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
git clone https://github.com/PhidgetsInc/opcdecode-ph22.git&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project requires &#039;&#039;&#039;libzstd&#039;&#039;&#039; to run. Install it with the following command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
apt install libzstd-dev&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a second project visible in the SBC web interface:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_project2.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Click on openpixelcontrol-ph22 and start the project:&lt;br /&gt;
&lt;br /&gt;
[[Image:xL_startProj.png|link=|center]]&lt;br /&gt;
&lt;br /&gt;
Then go back and do the same for opcdecode-ph22. You should see your lights turn on and display the default pattern.&lt;br /&gt;
&lt;br /&gt;
You can now configure both projects to run on boot as we did in the previous section, which will cause the pattern to display autonomously on boot, even if the SBC isn&#039;t connected to any network. You can design and save your own sequence in xLights and copy the .fseq file to the SBC to customize the pattern.&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_startProj.png&amp;diff=35677</id>
		<title>File:XL startProj.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_startProj.png&amp;diff=35677"/>
		<updated>2026-06-10T22:11:03Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_project2.png&amp;diff=35676</id>
		<title>File:XL project2.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_project2.png&amp;diff=35676"/>
		<updated>2026-06-10T22:10:48Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_startup.png&amp;diff=35675</id>
		<title>File:XL startup.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_startup.png&amp;diff=35675"/>
		<updated>2026-06-10T22:10:36Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Animation.gif&amp;diff=35674</id>
		<title>File:Animation.gif</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Animation.gif&amp;diff=35674"/>
		<updated>2026-06-10T22:10:25Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_sshConnect.png&amp;diff=35673</id>
		<title>File:XL sshConnect.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_sshConnect.png&amp;diff=35673"/>
		<updated>2026-06-10T22:10:17Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_bulb.png&amp;diff=35672</id>
		<title>File:XL bulb.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_bulb.png&amp;diff=35672"/>
		<updated>2026-06-10T22:10:06Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_timeline.png&amp;diff=35671</id>
		<title>File:XL timeline.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_timeline.png&amp;diff=35671"/>
		<updated>2026-06-10T22:09:56Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_universe.png&amp;diff=35670</id>
		<title>File:XL universe.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_universe.png&amp;diff=35670"/>
		<updated>2026-06-10T22:09:46Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_layoutOptions.png&amp;diff=35669</id>
		<title>File:XL layoutOptions.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_layoutOptions.png&amp;diff=35669"/>
		<updated>2026-06-10T22:09:38Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_layout.png&amp;diff=35668</id>
		<title>File:XL layout.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_layout.png&amp;diff=35668"/>
		<updated>2026-06-10T22:09:25Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_IP.png&amp;diff=35667</id>
		<title>File:XL IP.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_IP.png&amp;diff=35667"/>
		<updated>2026-06-10T22:09:17Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_controller.png&amp;diff=35666</id>
		<title>File:XL controller.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_controller.png&amp;diff=35666"/>
		<updated>2026-06-10T22:08:28Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_serverRunning.png&amp;diff=35665</id>
		<title>File:XL serverRunning.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_serverRunning.png&amp;diff=35665"/>
		<updated>2026-06-10T22:08:16Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_make.png&amp;diff=35664</id>
		<title>File:XL make.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_make.png&amp;diff=35664"/>
		<updated>2026-06-10T22:08:07Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_project1.png&amp;diff=35663</id>
		<title>File:XL project1.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_project1.png&amp;diff=35663"/>
		<updated>2026-06-10T22:07:52Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_packages.png&amp;diff=35662</id>
		<title>File:XL packages.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_packages.png&amp;diff=35662"/>
		<updated>2026-06-10T22:07:41Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_controlpanel.png&amp;diff=35661</id>
		<title>File:XL controlpanel.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_controlpanel.png&amp;diff=35661"/>
		<updated>2026-06-10T22:07:20Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XL_setup.png&amp;diff=35660</id>
		<title>File:XL setup.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XL_setup.png&amp;diff=35660"/>
		<updated>2026-06-10T22:07:11Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:XLights.png&amp;diff=35659</id>
		<title>File:XLights.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:XLights.png&amp;diff=35659"/>
		<updated>2026-06-10T22:06:46Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Language_-_C&amp;diff=35653</id>
		<title>Language - C</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Language_-_C&amp;diff=35653"/>
		<updated>2026-05-27T19:58:04Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: /* GCC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#seo:|description=Learn how to use Phidget USB devices with C and C++.}}&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
&lt;br /&gt;
== Get Started ==&lt;br /&gt;
With the Phidget22 library, it&#039;s easy to create C or C++ applications that work with Phidget devices.&lt;br /&gt;
&lt;br /&gt;
== C Libraries ==&lt;br /&gt;
If you&#039;ve installed the Phidget drivers for [[OS - Windows|Windows]], [[OS - macOS|MacOS]], or [[OS - Linux|Linux]], then you already have the files you need for your C project. &lt;br /&gt;
&lt;br /&gt;
==== Windows Considerations ====&lt;br /&gt;
When adding directories for your project dependencies, add&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
C:/Program Files/Phidgets/Phidget22&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And for the linker, you can add&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
C:/Program Files/Phidgets/Phidget22/phidget22.lib}}     #(for 64-bit systems)&lt;br /&gt;
C:/Program Files/Phidgets/Phidget22/x86/phidget22.lib}} #(for 32-bit systems)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====macOS Considerations====&lt;br /&gt;
Legacy Phidgets running a HID USB stack require a driver extension (macOS 10.15 and newer) or a kernel extension (macOS 10.14 and earlier). During development, we recommend downloading the appropriate [https://www.phidgets.com/docs/OS_-_macOS#Quick_Downloads package] which will install the extension. When deploying applications, review the README in the [https://cdn.phidgets.com/downloads/phidget22/libraries/macos/Phidget22_macosdevel.zip macOS Development Files] for information about bundling the extension with your application.&lt;br /&gt;
&lt;br /&gt;
=====Determining USB Stack=====&lt;br /&gt;
To determine which USB stack your device is running, navigate to the product page and then to the specification tab, and look for the &#039;&#039;USB Stack&#039;&#039; specification. If you are using a VINT device, navigate to the product page for the VINT Hub you are using.&lt;br /&gt;
&lt;br /&gt;
[[Image:Javascript_networkserver_webusb_spec.png|center|600px|link=https://cdn.phidgets.com/docs/images/8/80/Javascript_networkserver_webusb_spec.png]]&lt;br /&gt;
&lt;br /&gt;
====Linux Considerations====&lt;br /&gt;
Linux restricts access to USB devices to the root user. &lt;br /&gt;
&lt;br /&gt;
To run your C application as a regular user, you&#039;ll need to [{{SERVER}}/docs/OS_-_Linux#Setting_udev_Rules set up udev rules] on your system.&lt;br /&gt;
&lt;br /&gt;
=== Library Files ===&lt;br /&gt;
If you would like to manually manage the Phidget22 library files, you can download them [https://cdn.phidgets.com/downloads/phidget22/libraries/windows/Phidget22-windevel.zip here].&lt;br /&gt;
&lt;br /&gt;
== Development Environment Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== GCC === &lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
| &lt;br /&gt;
The most common tool for C development is GCC, whether used in the command line or through an IDE. GCC is packaged with many other IDEs and packages, so you may already have it installed.&lt;br /&gt;
&lt;br /&gt;
{{hiddenh4|Windows}}&lt;br /&gt;
We recommend installing [https://www.cygwin.com/ Cygwin] or [https://sourceforge.net/projects/mingw/ MinGW], ensuring you select all gcc packages when prompted by the installer.  &lt;br /&gt;
&lt;br /&gt;
To compile your code, go to the folder where your code is and open the command prompt by typing &#039;cmd&#039; in the address bar.&lt;br /&gt;
&lt;br /&gt;
The specific command you will use depends on your compiler of choice:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
#Cygwin x86:&lt;br /&gt;
gcc example.c -o example -I&amp;quot;/cygdrive/c/Program Files/Phidgets/Phidget22&amp;quot;-L&amp;quot;/cygdrive/c/Program Files/Phidgets/Phidget22/x86&amp;quot; -lphidget22&lt;br /&gt;
&lt;br /&gt;
#Cygwin x64:&lt;br /&gt;
gcc example.c -o example -I&amp;quot;/cygdrive/c/Program Files/Phidgets/Phidget22&amp;quot; -L&amp;quot;/cygdrive/c/Program Files/Phidgets/Phidget22&amp;quot; -lphidget22&lt;br /&gt;
&lt;br /&gt;
#MinGW:&lt;br /&gt;
gcc example.c -o example -I&amp;quot;C:/Program Files/Phidgets/Phidget22&amp;quot; -L&amp;quot;C:/Program Files/Phidgets/Phidget22/x86&amp;quot; -lphidget22&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running the commands above for either Cygwin or MinGW, an executable file called example.exe will be created. Enter the following command to run the program:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
./example.exe&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{hiddenh4|MacOS}}&lt;br /&gt;
If you don&#039;t already have gcc installed, you can get it by installing [https://developer.apple.com/xcode/ Xcode].&lt;br /&gt;
&lt;br /&gt;
To compile the program, enter the following command in the terminal, substituting &amp;quot;example&amp;quot; for the name of your C file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
gcc example.c -o example -F /Library/Frameworks -framework Phidget22 -I /Library/Frameworks/Phidget22.framework/Headers&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Finally, run the program by entering the following command in the terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
./example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Success! The project is now running with Phidgets.&lt;br /&gt;
&lt;br /&gt;
{{hiddenh4|Linux}}&lt;br /&gt;
On Linux, gcc is installed through the package manager:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
apt-get install gcc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To compile the program, enter the following command in the terminal, substituting &amp;quot;example&amp;quot; for the name of your C file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
gcc example.c -o example -lphidget22&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
After compiling, you can run the program by entering the following command in the terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
./example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Success! The project is now running with Phidgets.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Visual Studio === &lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
| If you want to jump right into a pre-configured project, you can download one on our [https://www.phidgets.com/?view=code_samples&amp;amp;lang=C Code Sample Generator] page. || [[Image:Language_C_VSProject.jpg|center|link=https://cdn.phidgets.com/docs/images/f/f1/Language_C_VSProject.jpg|350px]]&lt;br /&gt;
|-&lt;br /&gt;
| To configure a new project, follow these steps. ||&lt;br /&gt;
|-&lt;br /&gt;
| First, create a new Win32 Console Application: || [[Image:Language_C_VS_step1.jpg|center|link=https://cdn.phidgets.com/docs/images/a/a1/Language_C_VS_step1.jpg|350px]]&lt;br /&gt;
|-&lt;br /&gt;
| If you are using a 64-bit machine, select x64, otherwise, select x86: || [[Image:Language_C_VS_step2.jpg|center|link=https://cdn.phidgets.com/docs/images/6/6b/Language_C_VS_step2.jpg|350px]]&lt;br /&gt;
|-&lt;br /&gt;
| Next, right click on the source folder and click New Item: || [[Image:Language_C_VS_step3.jpg|center|link=https://cdn.phidgets.com/docs/images/e/e1/Language_C_VS_step3.jpg|350px]]&lt;br /&gt;
|-&lt;br /&gt;
| Give the source file a name and click Add: || [[Image:Language_C_VS_step4.jpg|center|link=https://cdn.phidgets.com/docs/images/e/e5/Language_C_VS_step4.jpg|350px]]&lt;br /&gt;
|-&lt;br /&gt;
| Right click your project and access its properties: || [[Image:Language_C_VS_step5.jpg|center|link=https://cdn.phidgets.com/docs/images/1/1e/Language_C_VS_step5.jpg|350px]]&lt;br /&gt;
|-&lt;br /&gt;
| Go to Configuration Properties -&amp;gt; C/C++ -&amp;gt; General and add this to the additional include directories:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
C:\Program Files\Phidgets\Phidget22&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|| [[Image:Language_C_VS_step6.jpg|center|link=https://cdn.phidgets.com/docs/images/d/d3/Language_C_VS_step6.jpg|350px]]&lt;br /&gt;
|-&lt;br /&gt;
| Go to Configuration Properties -&amp;gt; Linker -&amp;gt; Input and add the appropriate line to additional dependencies:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
C:\Program Files\Phidgets\Phidget22\phidget22.lib #(for 64-bit systems)&lt;br /&gt;
C:\Program Files\Phidgets\Phidget22\x86\phidget22.lib #(for 32-bit systems)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|| [[Image:Language_C_VS_step7.jpg|center|link=https://cdn.phidgets.com/docs/images/0/09/Language_C_VS_step7.jpg|350px]]&lt;br /&gt;
|-&lt;br /&gt;
| Lastly, include the Phidget library at the beginning of your program:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
#include &amp;lt; phidget22.h &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== PhidgetSBC Web Interface ===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;center&amp;gt;{{#ev:youtube|2hTlVexctqY|rel=0}}&amp;lt;/center&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example Code ==&lt;br /&gt;
Navigate to our [https://www.phidgets.com/?view=code_samples&amp;amp;lang=C Code Sample Generator] to view and download code samples that are tailored to your specific device.&lt;br /&gt;
&lt;br /&gt;
[[Image:Language_c_codesample2.png|center|600px|link=]]&lt;br /&gt;
&lt;br /&gt;
===Phidget Programming Basics===&lt;br /&gt;
{{PhidgetProgrammingBasicsLink}}&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
[{{SERVER}}/?view=api&amp;amp;lang=C Phidget22 API]&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Template:DCMotor_ESTOP&amp;diff=35652</id>
		<title>Template:DCMotor ESTOP</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Template:DCMotor_ESTOP&amp;diff=35652"/>
		<updated>2026-05-26T21:45:15Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#switch: {{{1}}}&lt;br /&gt;
 | bldc= New BLDC Motor Phidgets include an E-Stop circuit that can be used to trigger a Failsafe state.&lt;br /&gt;
 | dc = New DC Motor Phidgets include an E-Stop circuit that can be used to trigger a Failsafe state.&lt;br /&gt;
 | #default = New Phidget motor controllers include an E-Stop circuit that can be used to trigger a Failsafe state.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;width:75%;text-align:center&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot; | E-Stop Input Terminals&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot; | Result&lt;br /&gt;
|-&lt;br /&gt;
| Shorted || Normal operation&lt;br /&gt;
|-&lt;br /&gt;
| Open || Failsafe state activated&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The E-Stop input is shorted with a jumper wire by default. If you would like to implement an E-Stop system, we recommend connecting a normally-closed (NC) switch to the E-Stop input.&lt;br /&gt;
&lt;br /&gt;
[[Image:Multi_estop.png|link=|thumb|A 3PST E-stop switch|100px]]&lt;br /&gt;
====Multiple Motor Controllers====&lt;br /&gt;
&lt;br /&gt;
If your project uses multiple motor controllers with E-Stops, we recommend wiring them separately because wiring them together can cause ground loops that introduce instability. The best solution is to buy a multi-throw E-Stop switch that provides a separate circuit for each controller. &lt;br /&gt;
&lt;br /&gt;
You can search for on an electronics retailer like Digikey for a DPST-NC switch for two controllers, or 3PST/4PST for three or four.&lt;br /&gt;
&lt;br /&gt;
====Other Considerations====&lt;br /&gt;
The E-Stop circuit does not physically interact with the supply voltage or the motor connection. You should not wire your motor, or your supply voltage to this circuit.&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Multi_estop.png&amp;diff=35651</id>
		<title>File:Multi estop.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Multi_estop.png&amp;diff=35651"/>
		<updated>2026-05-26T21:42:37Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=BLDCMotor_API_Guide&amp;diff=35650</id>
		<title>BLDCMotor API Guide</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=BLDCMotor_API_Guide&amp;diff=35650"/>
		<updated>2026-05-26T19:37:17Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#seo:|description=Get started with your Brushless DC Motor Phidget}}&lt;br /&gt;
[[Category:IntroGuide]]&lt;br /&gt;
&amp;lt;div class=&amp;quot;nonumtoc&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toclimit-4&amp;quot;&amp;gt;&lt;br /&gt;
=Introduction=&lt;br /&gt;
[[Image:DCC1120_0.png|thumb|link=https://cdn.phidgets.com/docs/images/3/38/DCC1120_0.png|&amp;lt;center&amp;gt;30V 50A Brushless DC Motor Phidget (DCC1120_0)&amp;lt;/center&amp;gt;]]&lt;br /&gt;
This guide will provide information about the Brushless DC Motor (BLDC) API to get you up and running with your new BLDC Motor Phidget.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Before starting this guide, visit the Quick Start Guide on your BLDC Motor Phidget&#039;s product page for information about wiring and power.&lt;br /&gt;
&lt;br /&gt;
==Guide Compatibility==&lt;br /&gt;
&amp;lt;tabber&amp;gt;&lt;br /&gt;
Info=&lt;br /&gt;
&#039;&#039;Select your controller for compatibility information relating to this guide.&#039;&#039;&lt;br /&gt;
|-|&lt;br /&gt;
DCC1120=&lt;br /&gt;
[[Image:DCC1120_0.png|link=https://cdn.phidgets.com/docs/images/3/38/DCC1120_0.png|thumb|200px|[{{SERVER}}/?prodid=1334 30V 50A Brushless DC Motor Phidget (DCC1120_0)]]]&lt;br /&gt;
The [{{SERVER}}/?prodid=1334 30V 50A Brushless DC Motor Phidget (DCC1120_0)] is fully compatible with this guide.&lt;br /&gt;
|-|&lt;br /&gt;
DCC1100=&lt;br /&gt;
[[Image:DCC1100_0.jpg|link=https://cdn.phidgets.com/docs/images/8/87/DCC1100_0.jpg|thumb|200px|[https://www.phidgets.com/?prodid=1391 Brushless DC Motor Phidget (DCC1100_1)]]]&lt;br /&gt;
[https://www.phidgets.com/?prodid=1391 Brushless DC Motor Phidget (DCC1100_1)] considerations:&lt;br /&gt;
* Stall Velocity is not covered in this guide. Information on this topic is available in the device API.&lt;br /&gt;
|-|&lt;br /&gt;
&amp;lt;/tabber&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=BLDCMotor API Overview=&lt;br /&gt;
==Phidget Control Panel==&lt;br /&gt;
After wiring your BLDC Motor Phidget, we recommend opening the [https://www.phidgets.com/docs/Phidget_Control_Panel Phidget Control Panel] on a Windows computer to experiment with key features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:DCC1120_0_Panel.png|center|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the BLDC Motor Phidget is powered, it will appear up on the Phidget Control Panel device list as shown above. Double-click on the &#039;&#039;BLDC Motor Controller&#039;&#039; entry to view the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:DCC1120_0_BLDC.png|800px|center|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After opening the program, you will see the screen shown above. The program is split into multiple sections to help you get familiar with your motor controller.&lt;br /&gt;
#Phidget Info&lt;br /&gt;
#Motor Status&lt;br /&gt;
#Controls&lt;br /&gt;
#Configuration&lt;br /&gt;
&lt;br /&gt;
In this guide, we will focus on the areas that contain important information about controlling your Brushless DC motor. For information about the Phidget Info section, and the Phidget Control Panel in general, visit our [https://www.phidgets.com/docs/Phidget_Control_Panel Phidget Control Panel] Page.&lt;br /&gt;
&lt;br /&gt;
==Controls==&lt;br /&gt;
{{DCBLDCMotor_Controls}}&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
This area of the program allows you to try out different configurations with your BLDC Motor Phidget to determine the best fit for your application.&lt;br /&gt;
&lt;br /&gt;
===Drive Mode===&lt;br /&gt;
{{DCBLDCMotor_DriveMode|bldc}}&lt;br /&gt;
&lt;br /&gt;
===Rescale Factor===&lt;br /&gt;
&amp;lt;center&amp;gt;{{#ev:youtube|SbO3hAuYsAE|rel=0}}&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Rescale Factor allows you to change the units of the following properties:&lt;br /&gt;
* [[#Position|Position]]&lt;br /&gt;
&lt;br /&gt;
By default, the units will be in commutations which is dictated by the number of poles/phases your motor and are often non-intuitive. We recommend utilizing the Rescale Factor so your software is easier to understand.&lt;br /&gt;
&lt;br /&gt;
====Example Calculations====&lt;br /&gt;
Generally, most users will prefer units of degrees or rotations. To determine an appropriate Rescale Factor, you will need to know the following values:&lt;br /&gt;
*Commutations per revolution, equivalent to the number of poles multiplied by the number of phases&lt;br /&gt;
*Gearbox ratio (if applicable)&lt;br /&gt;
&lt;br /&gt;
These values will be available from manufacturer data sheets, or directly on the motor.&lt;br /&gt;
&lt;br /&gt;
=====Converting to Degrees=====&lt;br /&gt;
Specifications of system:&lt;br /&gt;
* Motor gear ratio: 10:1&lt;br /&gt;
* Motor poles: 2&lt;br /&gt;
* Motor phases: 3&lt;br /&gt;
&lt;br /&gt;
Rescale Factor = 360 / (10&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;2&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;3) = &#039;&#039;&#039;6.0&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=====Converting to Rotations=====&lt;br /&gt;
Specifications of system:&lt;br /&gt;
* Motor gear ratio: 10:1&lt;br /&gt;
* Motor poles: 2&lt;br /&gt;
* Motor phases: 3&lt;br /&gt;
&lt;br /&gt;
Rescale Factor = 1 / (10&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;2&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;3) = &#039;&#039;&#039;0.016666667&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Braking Enabled===&lt;br /&gt;
{{DCBLDCMotor_BrakingEnabled}}&lt;br /&gt;
&lt;br /&gt;
===Surge Current Limit===&lt;br /&gt;
{{DCBLDCMotor_SurgeCurrentLimit}}&lt;br /&gt;
&lt;br /&gt;
===Acceleration===&lt;br /&gt;
{{DCBLDCMotor_Acceleration}}&lt;br /&gt;
&lt;br /&gt;
===Data Interval===&lt;br /&gt;
{{DCBLDCMotor_DataInterval}}&lt;br /&gt;
&lt;br /&gt;
==Motor Status==&lt;br /&gt;
This area of the program shows information that has been sent back from the BLDC Motor Phidget.&lt;br /&gt;
===Velocity===&lt;br /&gt;
{{DCMotor_VelocityStatus}}&lt;br /&gt;
&lt;br /&gt;
===Braking Strength===&lt;br /&gt;
{{DCMotor_BrakingStrength}}&lt;br /&gt;
&lt;br /&gt;
===Position===&lt;br /&gt;
The most recent Position value reported by the controller. The Position is calculated using Hall Effect sensors mounted inside the motor, therefore, the resolution of the position depends on the motor you are using.&lt;br /&gt;
&lt;br /&gt;
====Other Considerations====&lt;br /&gt;
* {{DCMotor_RescaleFactorNote}}&lt;br /&gt;
* Consider using an encoder for more accurate position information.&lt;br /&gt;
&lt;br /&gt;
===Active Current Limit===&lt;br /&gt;
{{DCMotor_ActiveCurrentLimit}}&lt;br /&gt;
&lt;br /&gt;
===Motor Inductance===&lt;br /&gt;
{{DCMotor_MotorInductance}}&lt;br /&gt;
&lt;br /&gt;
==Failsafe==&lt;br /&gt;
{{DCMotor_Failsafe}}&lt;br /&gt;
&lt;br /&gt;
===E-Stop===&lt;br /&gt;
{{DCMotor_ESTOP|bldc}}&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
{{DCMotor_Errors|bldc}}&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=OS_-_Android&amp;diff=35649</id>
		<title>OS - Android</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=OS_-_Android&amp;diff=35649"/>
		<updated>2026-05-25T21:52:16Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: /* Direct USB Connection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;metadesc&amp;gt;Communicate over USB with sensors, controllers and relays with Phidgets! Program in Android using Android Java.&amp;lt;/metadesc&amp;gt;&lt;br /&gt;
[[Category:OS]]&lt;br /&gt;
{|&lt;br /&gt;
|style=&amp;quot;vertical-align:middle; width: 60%;&amp;quot;|&lt;br /&gt;
==Getting Started with Android==&lt;br /&gt;
Welcome to using Phidgets with Android! &lt;br /&gt;
&lt;br /&gt;
If this is your first Phidget, we highly recommend working through the Getting Started guide for your specific Phidget device, which may be found in its [[:Category:UserGuide|user guide]]. If you are ready to go, the first step to creating an Android application with Phidgets is downloading the Phidget libraries on your development machine!&lt;br /&gt;
|{{TOC limit|2}}&lt;br /&gt;
|}&lt;br /&gt;
==Download==&lt;br /&gt;
The Phidget libraries for Android development are available here:&lt;br /&gt;
*[https://cdn.phidgets.com/downloads/phidget22/libraries/android/phidget22-android.zip Android Java Libraries]&lt;br /&gt;
&lt;br /&gt;
Download and unpack the libraries. You will need to reference these files from your project in order to use Phidgets. This step is covered in detail in the [[Language - Android Java | Android Java page]]. If you need to access older versions of the libraries, [https://www.phidgets.com/downloads/phidget22/libraries/android/ click here].&lt;br /&gt;
&lt;br /&gt;
==Direct USB Connection==&lt;br /&gt;
For directly controlling a Phidget with your Android device (i.e. plugging a Phidget directly into your device), you will need to ensure the device is capable of being a USB host. Just having a port that the USB cable can fit into does not necessarily indicate that the port can host a USB device. On the other hand, some phones can use an OTG (on-the-go) cable to allow plugging USB devices into their charging port. Some tablets (like the Samsung Galaxy Tab, for example) have the large 30-pin connectors that can be changed into a USB host using an adapter.  &lt;br /&gt;
&lt;br /&gt;
The best way to know before getting your hands on a device is to check its specifications for whether it can serve as a USB host. Alternately, a quick way to figure out if your device can serve as a USB host is to try plugging other devices (such as a mouse, or USB memory stick) into your Android device.&lt;br /&gt;
&lt;br /&gt;
To allow the use of the network and/or USB connections, the following lines must be added to your AndroidManifest.xml file:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;!-- Required for network access --&amp;gt;&lt;br /&gt;
&amp;lt;uses-permission android:name=&amp;quot;android.permission.INTERNET&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Required for USB access --&amp;gt;&lt;br /&gt;
&amp;lt;uses-feature android:name=&amp;quot;android.hardware.usb.host&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to initialize the method that the Android device can use to communicate with the Phidget. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Java&amp;quot;&amp;gt;&lt;br /&gt;
//Allow direct USB connection of Phidgets&lt;br /&gt;
com.phidget22.usb.Manager.Initialize(this);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the device is closed, to completely clean up after using Phidgets, you must uninitialize the USB connection as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Java&amp;quot;&amp;gt;&lt;br /&gt;
//Disable USB connection to Phidgets&lt;br /&gt;
com.phidget22.usb.Manager.Uninitialize();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Network Server==&lt;br /&gt;
In applications where you aren&#039;t plugging Phidgets into your Android device directly, you must have a host computer that is running the Phidget Network Server. &lt;br /&gt;
&lt;br /&gt;
[[Image:android-connection.jpg|link=|center]]&lt;br /&gt;
&lt;br /&gt;
*Host computer: the computer that is physically connected to the Phidgets via USB and is running the Phidget Network Server.&lt;br /&gt;
*Client computer: a computer running a Phidgets application that accesses Phidgets connected to the host computer. When developing for Android, your Android device acts as the client.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case, you will need to install the Phidget libraries on your host computer, and get the Phidget Network Server up and running. Follow the &#039;&#039;Getting Started&#039;&#039; guide, and continue with the &#039;&#039;Network Server&#039;&#039; guide for your operating system. When you are done, come back and finish this guide!&lt;br /&gt;
*[[OS - Windows| Windows]]&lt;br /&gt;
*[[OS - macOS| macOS]]&lt;br /&gt;
*[[OS - Linux| Linux]]&lt;br /&gt;
*[[OS - Phidget SBC| Phidget Single Board Computer]]&lt;br /&gt;
&lt;br /&gt;
==Programming Languages==&lt;br /&gt;
&lt;br /&gt;
Now that you have the basics set up, check out the [[Language - Android Java|Android Java]] page for information on how to write code for Phidgets to run on your Android device.&lt;br /&gt;
&lt;br /&gt;
Note that Android Java is NOT the same as mainstream Java.  Any Java programs you have will probably need significant modification before they run on Android, including our [[Language - Java|mainstream Java]] Phidget Examples.&lt;br /&gt;
&lt;br /&gt;
==Software License==&lt;br /&gt;
By downloading the Android library you agree to adhere to the terms of the [{{SERVER}}/documentation/Licenses/Phidgets_EULA.pdf Phidgets End User License Agreement]. The C API section of Phidget22 is covered by the [https://opensource.org/licenses/BSD-3-Clause The 3-Clause BSD License]. The source code of C API can be found [{{SERVER}}/downloads/phidget22/libraries/linux/libphidget22.tar.gz here].&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=Language_-_Java&amp;diff=35648</id>
		<title>Language - Java</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=Language_-_Java&amp;diff=35648"/>
		<updated>2026-05-25T21:33:45Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#seo:|description=Learn how to use Phidget USB devices with Java.}}&lt;br /&gt;
[[Category:Language]]&lt;br /&gt;
&lt;br /&gt;
==Get Started==&lt;br /&gt;
With the Phidget22 library, it&#039;s easy to create Java applications that work with Phidget devices.&lt;br /&gt;
&lt;br /&gt;
==Java Libraries==&lt;br /&gt;
During development, we recommend downloading the appropriate installer or package for your [https://www.phidgets.com/docs/Operating_System_Support operating system]. This will place the required Phidget library files in standard locations where Java will look for them. When [[#Deploying Applications|deploying applications]], you can instead include these files manually as part of your application. &lt;br /&gt;
&lt;br /&gt;
====macOS Considerations====&lt;br /&gt;
Legacy Phidgets running a HID USB stack require a driver extension (macOS 10.15 and newer) or a kernel extension (macOS 10.14 and earlier). During development, we recommend downloading the appropriate [https://www.phidgets.com/docs/OS_-_macOS#Quick_Downloads package] which will install the extension. When deploying applications, review the README in the [https://cdn.phidgets.com/downloads/phidget22/libraries/macos/Phidget22_macosdevel.zip macOS Development Files] for information about bundling the extension with your application.&lt;br /&gt;
&lt;br /&gt;
=====Determining USB Stack=====&lt;br /&gt;
To determine which USB stack your device is running, navigate to the product page and then to the specification tab, and look for the &#039;&#039;USB Stack&#039;&#039; specification. If you are using a VINT device, navigate to the product page for the VINT Hub you are using.&lt;br /&gt;
&lt;br /&gt;
[[Image:Javascript_networkserver_webusb_spec.png|center|600px|link=https://cdn.phidgets.com/docs/images/8/80/Javascript_networkserver_webusb_spec.png]]&lt;br /&gt;
&lt;br /&gt;
====Linux Considerations====&lt;br /&gt;
Linux restricts access to USB devices to the root user. To run your Python application as a regular user, you&#039;ll need to [{{SERVER}}/docs/OS_-_Linux#Setting_Udev_Rules set up udev rules] on your system.&lt;br /&gt;
&lt;br /&gt;
==Development Environment Configuration==&lt;br /&gt;
&lt;br /&gt;
Before choosing a development environment, make sure you have the [http://www.oracle.com/technetwork/java/index.html Java Development Kit] installed. &lt;br /&gt;
&lt;br /&gt;
===Visual Studio Code===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
| To start developing with Java in VSCode, open it up and install the &#039;&#039;&#039;Extension Pack for Java&#039;&#039;&#039;.||[[Image:Language_java_vscode_extension2.png|center|350px|link=https://cdn.phidgets.com/docs/images/b/b4/Language_java_vscode_extension2.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Next, press &#039;&#039;&#039;Ctrl+Shift+P&#039;&#039;&#039; to open the command palette, type &amp;quot;java&amp;quot; and select &#039;&#039;&#039;Java: Create Java Project&#039;&#039;&#039;.  || [[Image:Language_java_vscode_createproj.png|center|360px|link=https://cdn.phidgets.com/docs/images/7/78/Language_java_vscode_createproj.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Select &amp;quot;No Build Tools&amp;quot; and select a directory for the new project. You&#039;ll be asked for a project name, and  VSCode will create the directory structure. || [[Image:Language_java_vscode_emptyproj.png|center|350px|link=https://cdn.phidgets.com/docs/images/c/c1/Language_java_vscode_emptyproj.png]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;|You&#039;ll need to get a copy of &#039;&#039;&#039;phidget22.jar&#039;&#039;&#039; to put inside the &amp;quot;lib&amp;quot; folder. [https://www.phidgets.com/downloads/phidget22/libraries/any/Phidget22Java.zip You can download phidget22.jar here]. &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| You can now begin writing code in the newly created &amp;quot;App.java&amp;quot; file, or you can download a [[#Example_Code|sample program]] for your device and place it in the &amp;quot;src&amp;quot; folder.&lt;br /&gt;
|-&lt;br /&gt;
| Compile and run by pressing &#039;&#039;&#039;F5&#039;&#039;&#039; or by clicking the play button in the top right. || [[Image:Language_java_vscode_run.png|center|350px|link=https://cdn.phidgets.com/docs/images/e/ea/Language_java_vscode_run.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Once you&#039;re ready to compile your project into a .jar executable, click on the &#039;&#039;&#039;Java Projects&#039;&#039;&#039; section in the explorer. || [[Image:Language_java_vscode_jar.png|center|350px|link=https://cdn.phidgets.com/docs/images/6/65/Language_java_vscode_jar.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Click on the export icon, and then select your main class and click OK. || [[Image:Language_java_vscode_jar2.png|center|350px|link=https://cdn.phidgets.com/docs/images/7/74/Language_java_vscode_jar2.png]]&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| Now you can run your new .jar file with the following command:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
java -jar Example.jar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Javac===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|The easiest way to allow Java to access the Phidgets Java library is to place a copy of &#039;&#039;&#039;phidget22.jar&#039;&#039;&#039; in the same folder as your .java program.  ||[[Image:Language_java_javac_folder.png|center|350px|link=https://cdn.phidgets.com/docs/images/8/89/Language_java_javac_folder.png]]&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.phidgets.com/downloads/phidget22/libraries/any/Phidget22Java.zip You can download phidget22.jar here].|| &lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|To run your program, enter the following command in the command prompt or terminal:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
javac -classpath .;phidget22.jar example.java&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then, enter the following command to run the program:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
java -classpath .;phidget22.jar example &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|| &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| Once you&#039;re ready to compile your project into a .jar executable, create a &#039;&#039;&#039;manifest.mf&#039;&#039;&#039; file with the following contents:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Manifest-Version: 1.0&lt;br /&gt;
Main-Class: example&lt;br /&gt;
Class-Path: phidget22.jar&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Make sure there&#039;s an empty newline at the bottom of the three lines and a space after each colon.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| Next, create the .jar file with this command:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
jar cfm example.jar manifest.mf *.class&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once the .jar is created, you can execute it with&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
java -jar example.jar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Netbeans===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|The easiest way to allow Java to access the Phidgets Java library is to place a copy of &#039;&#039;&#039;phidget22.jar&#039;&#039;&#039; in the same folder as your .java program.  ||[[Image:Language_java_javac_folder.png|center|350px|link=https://cdn.phidgets.com/docs/images/8/89/Language_java_javac_folder.png]]&lt;br /&gt;
|-&lt;br /&gt;
|[https://www.phidgets.com/downloads/phidget22/libraries/any/Phidget22Java.zip You can download phidget22.jar here].|| &lt;br /&gt;
|-&lt;br /&gt;
| To start, open NetBeans and create a new project. Select Java Application and follow the steps as directed by Netbeans.|| [[Image:Windows_netbeans1.jpg|center|350px|link=https://cdn.phidgets.com/docs/images/c/c9/Windows_netbeans1.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
| Next, add a reference to phidget22.jar by right-clicking on the libraries folder. || [[Image:Windows_netbeans2.jpg|center|350px|link=https://cdn.phidgets.com/docs/images/2/2b/Windows_netbeans2.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
| Navigate to the folder where you downloaded phidget22.jar, and select it. || [[Image:Windows_netbeans3.jpg|center|350px|link=https://cdn.phidgets.com/docs/images/7/76/Windows_netbeans3.jpg]]&lt;br /&gt;
|-&lt;br /&gt;
| The project now has access to Phidgets. By default, Netbeans should create an executable .jar file in the &#039;&#039;&#039;dist&#039;&#039;&#039; folder of the project directory when it&#039;s built. If it didn&#039;t, go to &#039;&#039;&#039;Build -&amp;gt; Packaging&#039;&#039;&#039; in the project properties and make sure &amp;quot;Build JAR after compiling&amp;quot; is checked.|| [[Image:Windows_netbeans4.png|center|350px|link=https://cdn.phidgets.com/docs/images/7/78/Windows_netbeans4.png]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| You can now run the .jar file from the command prompt with:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
java -jar phidgetTest.jar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Eclipse===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
| To start, open Eclipse and create a new Java project. Name the project and uncheck the &#039;&#039;&#039;create module-info.java file&#039;&#039;&#039; box.|| [[Image:java_eclipse_newproj.png|center|350px|link=https://cdn.phidgets.com/docs/images/9/97/Java_eclipse_newproj.png]]&lt;br /&gt;
|-&lt;br /&gt;
| On the Libraries tab, click Add External JARs and add [https://www.phidgets.com/downloads/phidget22/libraries/any/Phidget22Java.zip phidget22.jar].  to your project as an external jar. Be sure it&#039;s being added to the &#039;&#039;&#039;Classpath&#039;&#039;&#039; and not the module path. || [[Image:java_eclipse_library.png|center|350px|link=https://cdn.phidgets.com/docs/images/1/1b/Java_eclipse_library.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Create a new Class in your project. || [[Image:java_eclipse_newclass.png|center|350px|link=https://cdn.phidgets.com/docs/images/0/02/Java_eclipse_newclass.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Name the class, and be sure to check the &#039;&#039;&#039;public static void main&#039;&#039;&#039; box. Eclipse may require that you add a package name. || [[Image:java_eclipse_newclass2.png|center|350px|link=https://cdn.phidgets.com/docs/images/c/ca/Java_eclipse_newclass2.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Your project now has access to Phidgets! ||&lt;br /&gt;
|-&lt;br /&gt;
| Once you&#039;re ready to compile your project into a .jar executable, right click on the project in the package explorer and choose &#039;&#039;&#039;Export&#039;&#039;&#039;. Select &#039;&#039;&#039;Runnable JAR file&#039;&#039;&#039;. || [[Image:java_eclipse_export.png|center|350px|link=https://cdn.phidgets.com/docs/images/8/8c/Java_eclipse_export.png]]&lt;br /&gt;
|-&lt;br /&gt;
| Choose the main class and a destination for the .jar file and click finish. || [[Image:java_eclipse_export2.png|center|350px|link=https://cdn.phidgets.com/docs/images/8/8d/Java_eclipse_export2.png]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| You can now run the .jar file from the command prompt with:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
java -jar phidgetTest.jar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Android Studio===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
| To start, create a new project in Android Studio.|| [[Image:java_as_newproj.png|center|350px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
| Once you have a new project, be sure to switch the side bar to Project view. || [[Image:java_as_view.png|center|350px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
| Next, download the [https://cdn.phidgets.com/downloads/phidget22/libraries/android/phidget22-android.zipPhidget22 Android Java libraries], extract the contents, and open the resulting folder. || [[Image:java_as_extract.png|center|350px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
| Copy the .jar files into the &#039;&#039;&#039;app/libs/&#039;&#039;&#039; folder of your project. If you are only going to use network Phidgets in your app, then you don&#039;t need to copy Phidget22usb.jar into your project.&lt;br /&gt;
&lt;br /&gt;
Right click the jar files you just copied and select &#039;&#039;&#039;Add As Library.&#039;&#039;&#039;&lt;br /&gt;
|[[Image:java_as_jnilibs.png|center|350px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
|Create a directory called &#039;&#039;&#039;jnilibs&#039;&#039;&#039; under &#039;&#039;&#039;app/src/main&#039;&#039;&#039; || [[Image:java_as_jnilibs2.png|center|350px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
| Copy the remaining folders from the Phidget22 library (containing versions of libphidget22java.so) into the directory you just created. || [[Image:java_as_jnilibs3.png|center|350px|link=]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;|  To allow the use of the network and/or USB connections, the following lines must be added to your AndroidManifest.xml file:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;!-- Required for network access --&amp;gt;&lt;br /&gt;
&amp;lt;uses-permission android:name=&amp;quot;android.permission.INTERNET&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Required for USB access --&amp;gt;&lt;br /&gt;
&amp;lt;uses-feature android:name=&amp;quot;android.hardware.usb.host&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Finally, to import the Phidget22 library into your code, add the following line to the rest of your imports:&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
import com.phidget22.*;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The project now has access to Phidgets. Next, we&#039;ll walk through the steps for writing your own code. ||&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot;| &lt;br /&gt;
By following the instructions for your operating system and compiler above, you now have working examples and a project that is configured. This teaching section will help you understand how the examples were written so you can start writing your own code.&lt;br /&gt;
&lt;br /&gt;
Your main reference for writing Android Java code will be:&lt;br /&gt;
&lt;br /&gt;
* The [https://www.phidgets.com/?view=api Phidget22 API]&lt;br /&gt;
* The [https://www.phidgets.com/?view=code_samples&amp;amp;lang=Java Java example code]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step One: Initialize and Open&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You will need to declare your Phidget object in your code. For example, we can declare a digital input object like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
DigitalInput device;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we need to initialize the method(s) that the Android device can communicate with the Phidget. This is done either by enabling Network Server Discovery, and/or allowing direct USB connections as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
//Enable server discovery to list remote Phidgets&lt;br /&gt;
this.getSystemService(Context.NSD_SERVICE);&lt;br /&gt;
Net.enableServerDiscovery(ServerType.DEVICE_REMOTE);&lt;br /&gt;
&lt;br /&gt;
//Allow direct USB connection of Phidgets&lt;br /&gt;
com.phidget22.usb.Manager.Initialize(this);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To support remote (network) Phidgets on Android API versions earlier than API version 16, or to connect to Phidget Network Servers with passwords, you will need to add the specific server to your program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
//Add a specific network server to communicate with Phidgets remotely&lt;br /&gt;
Net.addServer(&amp;quot;ServerName&amp;quot;, &amp;quot;192.168.1.105&amp;quot;, 5661, &amp;quot;password&amp;quot;, 0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the connection methods are established, the Phidget object needs to be initialized and opened:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
device = new DigitalInput();&lt;br /&gt;
device.open();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although we are not including it on this page, you should include error handling for all Phidget functions. Here is an example of the previous code with error handling:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
try{&lt;br /&gt;
    device = new DigitalInput();&lt;br /&gt;
    device.open();&lt;br /&gt;
}catch (PhidgetException e) {&lt;br /&gt;
    e.printStackTrace();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information on error handling with Phidgets, see [[Handling Errors and Logging|this page]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step Two: Wait for Attachment (plugging in) of the Phidget&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Simply calling open does not guarantee you can use the Phidget immediately. To use a Phidget, it must be plugged in (attached). We can handle this by using event driven programming and tracking the attach events. Alternatively, we can modify our code so we wait for an attachment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
ch = new DigitalInput();&lt;br /&gt;
ch.open(5000); //wait for attach for 5 seconds, if not time out&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Waiting for attachment will block indefinitely until a connection is made, or until the timeout value is exceeded.&lt;br /&gt;
&lt;br /&gt;
To use events, we have to modify our code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
ch = new DigitalInput();&lt;br /&gt;
device.addAttachListener(new AttachListener() {&lt;br /&gt;
    public void onAttach(final AttachEvent attachEvent) {&lt;br /&gt;
        AttachEventHandler handler = new AttachEventHandler(device);&lt;br /&gt;
        synchronized(handler)&lt;br /&gt;
        {&lt;br /&gt;
            runOnUiThread(handler);&lt;br /&gt;
            try {&lt;br /&gt;
                handler.wait();&lt;br /&gt;
            } catch (InterruptedException e) {&lt;br /&gt;
                e.printStackTrace();&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
});&lt;br /&gt;
ch.open();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we have to declare the function that will be called when an attach event is fired - in this case the function AttachEventHandler will be called.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
class AttachEventHandler implements Runnable { &lt;br /&gt;
    Phidget device;&lt;br /&gt;
&lt;br /&gt;
    public AttachEventHandler(Phidget device) {&lt;br /&gt;
        this.device = device;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public void run() {&lt;br /&gt;
        TextView attachedTxt = (TextView) findViewById(R.id.attachedTxt);&lt;br /&gt;
        attachedTxt.setText(&amp;quot;Attached&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
        //notify that we&#039;re done&lt;br /&gt;
        synchronized(this)&lt;br /&gt;
        {&lt;br /&gt;
	    this.notify();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step Three: Do Things with the Phidget&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
We recommend the use of event driven programming when working with Phidgets. In a similar way to handling an attach event as described above, we can also add an event handler for a state change event:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
ch = new DigitalInput();&lt;br /&gt;
device.addStateChangeListener(new DigitalInputStateChangeListener() {&lt;br /&gt;
	public void onStateChange(DigitalInputStateChangeEvent stateChangeEvent) {&lt;br /&gt;
        DigitalInputStateChangeEventHandler handler = &lt;br /&gt;
            new DigitalInputStateChangeEventHandler(device, stateChangeEvent);&lt;br /&gt;
	runOnUiThread(handler);&lt;br /&gt;
    }&lt;br /&gt;
});&lt;br /&gt;
ch.open();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code will connect a function and an event. In this case, the &#039;&#039;&#039;DigitalInputStateChangeEventHandler&#039;&#039;&#039; function will be called when there has been a change to the devices input.&lt;br /&gt;
&lt;br /&gt;
Next, we need to create the &#039;&#039;&#039;DigitalInputStateChangeEventHandler&#039;&#039;&#039; function itself:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
class DigitalInputStateChangeEventHandler implements Runnable {&lt;br /&gt;
    Phidget device;&lt;br /&gt;
    DigitalInputStateChangeEvent stateChangeEvent;&lt;br /&gt;
&lt;br /&gt;
    public DigitalInputStateChangeEventHandler(Phidget device,&lt;br /&gt;
       DigitalInputStateChangeEvent stateChangeEvent)&lt;br /&gt;
    {&lt;br /&gt;
        this.device = device;&lt;br /&gt;
        this.stateChangeEvent = stateChangeEvent;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public void run() {&lt;br /&gt;
        CheckBox stateBox = (CheckBox) findViewById(R.id.stateBox);&lt;br /&gt;
        stateBox.setChecked(stateChangeEvent.getState());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If events do not suit your needs, you can also poll the device directly for data using code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
boolean state = ch.getState();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step Four: Close and Delete&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
At the end of your program, be sure to close your device.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
ch.close();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the device is closed, to completely clean up after using Phidgets, you must uninitialize the USB connection as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
//Disable USB connection to Phidgets&lt;br /&gt;
com.phidget22.usb.Manager.Uninitialize();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you&#039;ve set up Phidgets in your programming environment, you should read our guide on [[Phidget Programming Basics]] to learn the fundamentals of programming with Phidgets.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== PhidgetSBC Web Interface ===&lt;br /&gt;
{| style=&amp;quot;margin:auto;&amp;quot; class=&amp;quot;table-no-border mw-collapsible mw-collapsed&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Instructions&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;center&amp;gt;{{#ev:youtube|gZmWvWXICIA|rel=0}}&amp;lt;/center&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Debian Linux may not have support for the newest JDK by default, so if you&#039;re developing your code on another machine, you may have to target an older version of Java in order to run it on the PhidgetSBC.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example Code==&lt;br /&gt;
Navigate to our [https://www.phidgets.com/?view=code_samples&amp;amp;lang=Java Code Sample Generator] to view and download code samples that are tailored to your specific device.&lt;br /&gt;
&lt;br /&gt;
[[Image:Language_java_codesample.png|center|600px|link=https://cdn.phidgets.com/docs/images/a/af/Language_java_codesample.png]]&lt;br /&gt;
&lt;br /&gt;
===Phidget Programming Basics===&lt;br /&gt;
{{PhidgetProgrammingBasicsLink}}&lt;br /&gt;
&lt;br /&gt;
== Deploying Applications ==&lt;br /&gt;
The following files are required for your Java application:&lt;br /&gt;
* phidget22.jar &lt;br /&gt;
* phidget22.dll&lt;br /&gt;
* phidget22java.dll&lt;br /&gt;
&lt;br /&gt;
The files can be found in the [https://cdn.phidgets.com/downloads/phidget22/libraries/windows/Phidget22-windevel.zip Development Files]. The .jar file is in lib/java, and the dll files are in lib/c/x64. &lt;br /&gt;
&lt;br /&gt;
Java will look for these files in several locations, including the classpath and the working folder of the project.&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
[{{SERVER}}/?view=api&amp;amp;lang=Python Phidget22 API]&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Java_as_jnilibs3.png&amp;diff=35647</id>
		<title>File:Java as jnilibs3.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Java_as_jnilibs3.png&amp;diff=35647"/>
		<updated>2026-05-25T21:31:00Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Java_as_jnilibs2.png&amp;diff=35646</id>
		<title>File:Java as jnilibs2.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Java_as_jnilibs2.png&amp;diff=35646"/>
		<updated>2026-05-25T21:28:20Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Java_as_jnilibs.png&amp;diff=35645</id>
		<title>File:Java as jnilibs.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Java_as_jnilibs.png&amp;diff=35645"/>
		<updated>2026-05-25T21:28:04Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Java_as_extract.png&amp;diff=35644</id>
		<title>File:Java as extract.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Java_as_extract.png&amp;diff=35644"/>
		<updated>2026-05-25T21:27:52Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Java_as_view.png&amp;diff=35643</id>
		<title>File:Java as view.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Java_as_view.png&amp;diff=35643"/>
		<updated>2026-05-25T21:27:24Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:Java_as_newproj.png&amp;diff=35642</id>
		<title>File:Java as newproj.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:Java_as_newproj.png&amp;diff=35642"/>
		<updated>2026-05-25T21:27:06Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=REL2103_User_Guide&amp;diff=35640</id>
		<title>REL2103 User Guide</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=REL2103_User_Guide&amp;diff=35640"/>
		<updated>2026-05-08T19:15:08Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: /* Part 4: Advanced Topics and Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOINDEX__&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;metadesc&amp;gt;Use a VINT port with the Solid State Relay Phidget to switch power to a circuit running at up to 30 volts and 10 amps, AC or DC.&amp;lt;/metadesc&amp;gt;&lt;br /&gt;
[[Category:UserGuide]]&lt;br /&gt;
==Part 1: Setup==&lt;br /&gt;
{{PT1 Deck Sequence}}&lt;br /&gt;
&lt;br /&gt;
==Part 2: Using Your Phidget==&lt;br /&gt;
===About===&lt;br /&gt;
The REL2103 is a solid-state relay capable of switching up to 10 amps or controlling power up to 30V. You interact with the REL2103 through the Digital Output Channel Class to turn on or off the power to a circuit.&lt;br /&gt;
&lt;br /&gt;
[[Image:REL2103_About.jpg|link=|center]]&lt;br /&gt;
&lt;br /&gt;
===Explore your Phidget Channels Using the Control Panel===&lt;br /&gt;
Double click on the Digital Output channel class under the port your REL2103 is connected to.&lt;br /&gt;
[[Image:REL2103_0_Panel_Example.jpg|link=]]&lt;br /&gt;
&lt;br /&gt;
{{UG-Part3}}&lt;br /&gt;
&lt;br /&gt;
==Part 4: Advanced Topics and Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
{{UGC-Start}}&lt;br /&gt;
{{UGC-Addressing}}&lt;br /&gt;
{{UGC-Entry|Solid State Relays|&lt;br /&gt;
|&lt;br /&gt;
A solid-state relay is an electrically-controlled switch. For more information about how SSRs work and how to use them, visit the [[Solid State Relay Guide]].}}&lt;br /&gt;
{{UGC-Entry|Using the SRC Terminals|&lt;br /&gt;
|&lt;br /&gt;
The two middle pins on the REL2103, labeled &amp;quot;SRC&amp;quot; give you access to the source of the MOSFETs used to switch your circuit. &lt;br /&gt;
If you are switching a DC load, the setup will be advantageous as you can double the maximum current handled by this Phidget (10A to 20A).&lt;br /&gt;
 &lt;br /&gt;
[[Image:REL2103-src.jpg|link=|600px]]&lt;br /&gt;
&lt;br /&gt;
The white schematic on the left shows a simplified version of the REL2103&#039;s circuitry: An optocoupler that activates two MOSFETs. The black schematic on the right shows how you would hook up a DC circuit to take advantage of the increased maximum current.}}&lt;br /&gt;
{{UGC-Entry|Can I use this relay without a VINT Hub?|&lt;br /&gt;
|&lt;br /&gt;
Unlike most VINT devices that communicate to the VINT Hub by sending packets on the data line, the REL2103 is simply controlled with the port in digital output mode. This means that you can control it with other digital output devices. For example, you can control it with a Phidget 1018 like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:REL2XXX_1018.png|link=|500px]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simplified diagram to clarify how the input side of REL2103 works:&lt;br /&gt;
&lt;br /&gt;
[[Image:REL2103_circuit.png|link=|650px]]&lt;br /&gt;
&lt;br /&gt;
The red wire requires 5V to power the opto-isolator diode, and the white wire requires at least 3.3V to switch the MOSFET. &lt;br /&gt;
}}&lt;br /&gt;
{{UGC-End}}&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=File:REL2103_circuit.png&amp;diff=35639</id>
		<title>File:REL2103 circuit.png</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=File:REL2103_circuit.png&amp;diff=35639"/>
		<updated>2026-05-08T19:14:37Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
	<entry>
		<id>https://www.phidgets.com/docs/index.php?title=REL2002_User_Guide&amp;diff=35638</id>
		<title>REL2002 User Guide</title>
		<link rel="alternate" type="text/html" href="https://www.phidgets.com/docs/index.php?title=REL2002_User_Guide&amp;diff=35638"/>
		<updated>2026-05-08T15:33:10Z</updated>

		<summary type="html">&lt;p&gt;Mparadis: /* Part 4: Advanced Topics and Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOINDEX__&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;metadesc&amp;gt;Switch a small digital signal with the Signal Relay Phidget. Switches up to 60W of DC power or 125 VA of AC power.&amp;lt;/metadesc&amp;gt;&lt;br /&gt;
[[Category:UserGuide]]&lt;br /&gt;
==Part 1: Setup==&lt;br /&gt;
{{PT1 Deck Sequence}}&lt;br /&gt;
&lt;br /&gt;
== Part 2: Using Your Phidget ==&lt;br /&gt;
&lt;br /&gt;
===About===&lt;br /&gt;
[[File:1017_1_Relay_Diagram.jpg|200px|right|link=]]&lt;br /&gt;
&lt;br /&gt;
The REL2002 is a mechanical relay suitable for both AC and DC applications. It is a double-pole double-throw style relay meaning it will switch two circuits at once. You interact with the REL2002 through the Digital Output Channel Class to turn power to your circuit or device on and off . &lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
===Explore Your Phidget Channels Using The Control Panel===&lt;br /&gt;
&lt;br /&gt;
Double click on the Digital Output channel class under the port your REL2002 is connected to.&lt;br /&gt;
&lt;br /&gt;
[[Image:REL2002_Panel_Example.jpg|link=|center]]&lt;br /&gt;
&lt;br /&gt;
{{UG-Part3}}&lt;br /&gt;
&lt;br /&gt;
== Part 4: Advanced Topics and Troubleshooting ==&lt;br /&gt;
{{UGC-Start}}&lt;br /&gt;
{{UGC-Addressing}}&lt;br /&gt;
{{UGC-Entry|Mechanical Relays|&lt;br /&gt;
|&lt;br /&gt;
This relay is an electrically-controlled switch. For more information about how mechanical relays work and how to use them, visit the [[Mechanical Relay Guide]].&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
{{UGC-Entry|Can I use this relay without a VINT Hub?|&lt;br /&gt;
|&lt;br /&gt;
Unlike most VINT devices that communicate to the VINT Hub by sending packets on the data line, the REL2002 is simply controlled with the port in digital output mode. This means that you can control it with other digital output devices. For example, you can control it with a Phidget 1018 like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:REL2XXX_1018.png|link=|500px]]&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a simplified diagram to clarify how the REL2002 works:&lt;br /&gt;
&lt;br /&gt;
[[Image:REL2002_circuit.png|link=|650px]]&lt;br /&gt;
&lt;br /&gt;
The red wire requires 5V to power the relay coil, and the white wire requires at least 3.3V to switch the MOSFET. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{UGC-End}}&lt;/div&gt;</summary>
		<author><name>Mparadis</name></author>
	</entry>
</feed>