Alert.png

Notice: This page contains information for the legacy Phidget21 Library.

Phidget21 is out of support. Bugfixes may be considered on a case by case basis.

Phidget21 does not support VINT Phidgets, or new USB Phidgets released after 2020. We maintain a selection of legacy devices for sale that are supported in Phidget21.

We recommend that new projects be developed against the Phidget22 Library.


Click on the 2phidget22.jpg button in the menu bar to go to the Phidget22 version of this page.

Alert.png

Template:UsingAPhidgetInCodeSpecific: Difference between revisions

From Phidgets Legacy Support
No edit summary
Line 22: Line 22:


The {{{2}}} examples, regardless of programming language, try to follow this layout.  If specific code does not exist for the {{{2}}}, the outline below may still help with any code you write:  
The {{{2}}} examples, regardless of programming language, try to follow this layout.  If specific code does not exist for the {{{2}}}, the outline below may still help with any code you write:  
{{{6}}}
{{{6}}}
Visit the [[Software Overview#Language Support|page for your language]] to get the actual examples, and the API with syntax.  For a high-level view of the functions you can use on the {{{2}}}, read on.
Visit the [[Software Overview#Language Support|page for your language]] to get the actual examples, and the API with syntax.  For a high-level view of the functions you can use on the {{{2}}}, read on.

Revision as of 16:35, 25 November 2011

If this is your first time working with a Phidget, we suggest you start with the [[{{{1}}}|Getting Started Page]] for the {{{2}}}. The process which begins there will walk you through:

  1. Installing drivers and libraries
  2. Choosing a programming language
  3. Reading about General Phidget Programming, and
  4. Getting code examples for your language

Use those pages to download the examples and learn about the framework in which to develop your own code. You will be referred back here to refer to the specific functions and example layout for the {{{2}}}.

This device-specific API section is deliberately generic. It simply provides a list of functions available only to the {{{2}}} software object.

If you are looking for an API list of functions common to all Phidgets, you want the General Phidget API. The General API is also deliberately generic, so if you want details, you should get the API documentation from the page on your specific programming language.

{{{3}}} {{{2}}} Object

In your code, you should create and use a {{{7}}} object to use the functionality of this board.

In C, for example, this would be the set of {{{4}}} functions, or in Java it would be the {{{5}}} class.

Check the complete API for your programming language to find the specific syntax for the object and the calls below.

{{{3}}} {{{2}}} Code Examples

The {{{2}}} examples, regardless of programming language, try to follow this layout. If specific code does not exist for the {{{2}}}, the outline below may still help with any code you write: {{{6}}} Visit the page for your language to get the actual examples, and the API with syntax. For a high-level view of the functions you can use on the {{{2}}}, read on.