All software device objects have a common API and set of functions that allow you to open it, close it, and set a few listeners to general events such as attach (plug in), detach (unplug), and errors.īut when you create an actual software object, it is a software object specific to your device.ĬPhidget_open (( CPhidgetHandle ) device, -1 ) Īll specific language calls can be found in the API documentation located on each individual language page. Phidget devices are controlled using software objects. This page is a high-level introduction, by design. So, the most useful resource for the actual functions would be the API for your specific language. C++ and Java were selected because Java is a relatively high-level language and C++ is a relatively low level language, thereby showing how specific each language API really is. Small code snippets are provided for each step below. Use functions that the object provides, like turning on LEDs, reading sensors, triggering events on data change, etc.Detect when a Phidget is attached (plugged in) by using the object.Create a Phidget software object, which gives you access to the functions specific to that device. To use your Phidget within code, you'll want to: This page presents the general concepts needed to write code for a Phidget.īy this point, you should have installed the drivers for your operating system and the libraries for your specific programming language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |