Official Phidget22 JavaScript library.
This library includes both Node.js and browser support.
Phidgets are accessed over the network via the Phidget Network Server.
A full library is also available, which adds USB support: phidget22
Start by reading the Phidgets JavaScript Language Page.
npm install phidget22-net
ES6 module import:
import * as phidget22 from 'phidget22-net';
CommonJS import:
const phidget22 = require('phidget22-net');
Download the latest release here.
The release contains full, net, and usb versions of the library, in both UMD and ES module format.
UMD import:
<script src="phidget22.net.min.js"></script>
ES6 module import:
<script type="module">
import * as phidget22 from './phidget22.net.esm.js';
</script>
You can also load the library directly from UNPKG:
<script src="https://unpkg.com/phidget22-net@^3.10/browser/phidget22.min.js"></script>
App bundlers such as Webpack are supported with browser-specific files in the npm.
- Support for LCD1100_1
- Support for ENC1001_0
- Ensure that numbers are sent to the network server in the correct format - Numbers may be rounded to the nearest integer value.
- Support for STC1005_0 v110+
- Support for HUB0002_0, HUB0007_0, HUB0000_1
- Support for HUB0002_0, HUB0007_0, HUB0000_1
- Support 1046_1 and RCC1000_1
- bugfix: network connection could stop being maintained if it fails during the initial handshake
- Fix for HUB0001_0 v114 showing up as 'Unsupported USB Phidget' on release 3.15.1
- AutoSetSpeed support
- bugfix: Corruption of network packets wasn't being handled properly
- bugfix: Connection after authentication callback was being delayed
- Support STC1005_0
- Handle garbled json without crashing
- Fix DAQ1400 FrequencyInput mode
- Force IPv4 hostname resolution as the network server doesn't support IPv6
- Support MOT0100_0
- Support MOT1102_1, TMP1200_1
- Fixes a bug where a server connection can stop auto re-connecting if interrupted near the start of a connection
- Fixes a bug where a channel can become stuck while opening over an unstable network connection
- Improved logging in Node
- Error events are rate limited to 1/second
- Support 1014_3, 1017_2
- Support MOT0110_0
- Add option to network connect() to retry on initial failure
- Fixes a bug where a network connection reconnect can be cancelled immediately and no further attempts are made
- Fixes a bug in the network connection maintainer to ensure that only one connection request is active at a time
- Removed some superfluous log messages
- Node.js USB bugfixes
- Fix issue where a channel could end up with 2 simultaneous open requests internally
- Add client-side keepalives to network connection
- Initial v3 release