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:ExamplePseudocode: Difference between revisions
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
|<font face="courier new" family="monospace"> | |<font face="courier new" family="monospace"> | ||
<span style="color:#090;">// ----- Event Functions -----</span> | <span style="color:#090;">// ----- '''Event''' and Other Functions -----</span> | ||
Create any Language-Specific Functions (exception handling) | Create any Language-Specific Functions (exception handling) | ||
Line 32: | Line 32: | ||
|<font face="courier new" family="monospace"> | |<font face="courier new" family="monospace"> | ||
<span style="color:#090;">// ----- Main Code -----</span><br><br> | <span style="color:#090;">// ----- '''Main''' Code -----</span><br><br> | ||
'''Create''' Device Software Object<br> | '''Create''' Device Software Object<br> | ||
Hook Event Functions created above to Device<br> | Hook '''Event''' Functions created above to Device<br> | ||
'''Open''' Device<br> | '''Open''' Device<br> | ||
Revision as of 22:14, 8 December 2011
You can learn about the flow and the functions within the examples by reading about General Phidget Programming, which will walk you through the concepts in each example, regardless of your device or language.
The examples for each device all have this general structure so you can follow along:
// ----- Event and Other Functions ----- Create any Language-Specific Functions (exception handling) Create General Attach, Detach, and Error Handling Functions
Create Hardware-Specific Functions
|
{{{1}}} | |
// ----- Main Code -----
Close Device Delete Device
|
{{{2}}} |