Install Phidget Drivers for Node.js
Before getting started with the guides below, ensure you have the following components installed on your machine:
- You will need the Phidgets Drivers installed on the server machine
- You will need the Node.js Phidgets library. Use
npm install phidget22
Phidget Network Server
Finding Code Samples
To find the code sample to use for your Phidget, navigate to the Code Samples page and select your device from the drop-down menu.
Once you select your device, the code sample generator will give you a working code sample, and a selection of options to customize it to your needs.
Using the Code Samples
To use the code sample from the Code Samples page, you can click the Download Example button to download a Java file with the sample code.
Next, open the command prompt at the file location of your example and enter the following command:
Then enter the following command to run the example (replacing example.js with your example name):
Success! Your program is now running with Phidgets.
Now that you have set up Phidgets to work with your programming environment, we recommend you read our guide on Phidget Programming Basics to learn the fundamentals of programming with Phidgets.