phidget22
v3.20.1
Published
Phidget22 JavaScript Library
Downloads
488
Readme
Phidget22 JavaScript Library
Official Phidget22 JavaScript library.
This library includes both Node.js and browser support.
Phidgets are accessed over the network via the Phidget Network Server.
Newer Phidgets can also be opened directly over USB, allowing for no-install access within the Browser or Node.js.
A smaller network only library is also available: phidget22-net
Start by reading the Phidgets JavaScript Language Page.
Resources
Prerequisites
USB Access in Node.js requires installation of the optional usb dependency.
USB Access in the Browser requires a browser that supports WebUSB
Node.js
npm install phidget22
ES6 module import:
import * as phidget22 from 'phidget22';
CommonJS import:
const phidget22 = require('phidget22');
Browser
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.min.js"></script>
ES6 module import:
<script type="module">
import * as phidget22 from './phidget22.esm.js';
</script>
You can also load the library directly from UNPKG:
<script src="https://unpkg.com/phidget22@^3.10/browser/phidget22.min.js"></script>
App bundlers such as Webpack are supported with browser-specific files in the npm.
Changelog
3.20.1 - September 9 2024
- Support for 1024_1
3.19.1 - March 4 2024
- Support for LCD1100_1
3.18.1 - January 23 2024
- Support for ENC1001_0
3.17.4 - November 27 2023
- Ensure that numbers are sent to the network server in the correct format - Numbers may be rounded to the nearest integer value.
3.17.3 - October 4 2023
- Support for STC1005_0 v110+
3.17.2 - August 24 2023
- Support for HUB0002_0, HUB0007_0, HUB0000_1
3.17.1 - August 23 2023
- Support for HUB0002_0, HUB0007_0, HUB0000_1
3.16.1 - July 6 2023
- Support 1046_1 and RCC1000_1
3.15.3 - June 13 2023
- bugfix: network connection could stop being maintained if it fails during the initial handshake
3.15.2 - June 3 2023
- Fix for HUB0001_0 v114 showing up as 'Unsupported USB Phidget' on release 3.15.1
3.15.1 - May 26 2023
- AutoSetSpeed support
3.14.2 - April 17 2023
- bugfix: VINT device packets could get corrupted
- bugfix: detaching a VINT device could cause a USB hub to be closed, even if other channels are still being used
- bugfix: Quaternion from VINT MOT0110 was corrupted
- bugfix: Corruption of network packets wasn't being handled properly
- bugfix: Connection after authentication callback was being delayed
3.14.1 - March 31 2023
- Support STC1005_0
3.13.5 - March 28 2023
- Handle garbled json without crashing
3.13.4 - February 24 2023
- Fix DAQ1400 FrequencyInput mode
3.13.3 - February 23 2023
- Force IPv4 hostname resolution as the network server doesn't support IPv6
3.13.2 - January 9 2023
- Support MOT0100_0
3.13.1 - January 9 2023
- Support MOT1102_1, TMP1200_1
3.12.3 - December 5 2022
- Fixes a bug where a server connection can stop auto re-connecting if interrupted near the start of a connection
3.12.2 - December 2 2022
- 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
3.12.1 - September 12 2022
- Support 1014_3, 1017_2
- Support 1048_1, 1048_2 on USBConnection
3.11.1 - August 22 2022
- Support MOT0110_0
- Add option to network connect() to retry on initial failure
3.10.5 - July 28 2022
- Fixes a bug where a network connection reconnect can be cancelled immediately and no further attempts are made
3.10.4 - June 21 2022
- Fixes a bug in the network connection maintainer to ensure that only one connection request is active at a time
3.10.3 - May 5 2022
- Removed some superfluous log messages
3.10.2 - May 5 2022
- 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
3.10.1 - April 13 2022
- Initial v3 release