Template:PT3 JS ANY NODE: Difference between revisions
From Phidgets Support
(Created page with "<div class="phd-slide-deck" data-deck="PT3_JS_ANY_NODE"> <div class="phd-slide-deck-header"><h3>Language - JavaScript</h3></div> <div class="phd-slides"> <div class="phd-slide...") |
No edit summary |
||
Line 27: | Line 27: | ||
<br /> | <br /> | ||
<h2>Version | <h2>Version History</h2> | ||
<p> | <p><b>1.x.x</b> - Initial Release (unstable- highly recommend updating to 2.x.x or newer)</p> | ||
<b> | |||
<p><b>2.x.x</b> - Fixed stability issues</p> | |||
</p> | |||
<p><b>3.x.x</b> - Added WebUSB support for VINT devices</p> | |||
<p>Each release has potential breaking changes, so you should always revisit your code when updating to a new major release.</p> | |||
</div> | </div> | ||
<div class="phd-slide"> | <div class="phd-slide"> | ||
<h2>Phidget Network Server</h2> | <h2>JavaScript using the Phidget Network Server</h2> | ||
<p> | <p> | ||
Go to the <span>[https://www.phidgets.com/docs/Phidget_Network_Server#Using_The_Network_Server this page]</span> and select the tab with your OS to get the | |||
Network Server set up. | |||
</p> | </p> | ||
<p> | <p> | ||
Line 53: | Line 53: | ||
<p> | <p> | ||
The Phidget Server Webserver can be used to serve files - such as the Phidget JavaScript library, or your own projects. By default, it serves the JavaScript | The Phidget Server Webserver can be used to serve files - such as the Phidget JavaScript library, or your own projects. By default, it serves the JavaScript | ||
control panel files. | control panel files. | ||
</p> | |||
<p> | |||
In order to connect remotely, you need to use the <b>NetworkConnection</b> object. When you download a code sample later in this guide, make sure the | |||
<b>Remote</b> box is checked. | |||
</p> | |||
<h2>JavaScript using WebUSB</h2> | |||
<p> | |||
For library version 3.x.x or newer, you can connect to Phidgets plugged in locally via USB without having the Network Server running. This feature is only | |||
supported on VINT Phidgets. | |||
</p> | |||
<p> | |||
In order to connect using USB, you need to use the <b>USBConnection</b> object. When you download a code sample later in this guide, make sure the | |||
<b>Remote</b> box is unchecked. | |||
</p> | </p> | ||
</div> | </div> | ||
Line 102: | Line 118: | ||
<p>Once you've made your selections, click the <b>Download Example</b> button to download a sample script.</p> | <p>Once you've made your selections, click the <b>Download Example</b> button to download a sample script.</p> | ||
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_JS_ANY_NODE/- | <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_JS_ANY_NODE/-x310/50/JavaScript_Sample_Code_Download.png"></div> | ||
</div> | </div> | ||