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.
|
Template:UsingAPhidgetInCodeSpecific: Difference between revisions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
# Getting code examples for your language | # Getting code examples for your language | ||
This device-specific API section is deliberately generic. It simply provides a list of functions available ''only'' to an {{{2}} software object. | |||
The | If you are looking for an API list of functions common to ''all'' Phidgets, you want the [[General API|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 [[Software Overview#Language Support|your specific programming language]]. | ||
{{{3}}} | 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}}}. | ||
==={{{3}}} {{{2}}} Object=== | |||
In your code, you should create and use a Phidget InterfaceKit object to use the functionality of this board. | |||
In C, for example, this would be the set of '''<code>{{{4}}}</code>''' functions, or in Java it would be the '''<code>{{{5}}}</code>''' class. | |||
Check the complete API [[Software Overview#Language Support|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 [[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 19:36, 23 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:
- Installing drivers and libraries
- Choosing a programming language
- Reading about General Phidget Programming, and
- Getting code examples for your language
This device-specific API section is deliberately generic. It simply provides a list of functions available only to an {Template: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.
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}}}.
{{{3}}} {{{2}}} Object
In your code, you should create and use a Phidget InterfaceKit 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.