Software Overview: Difference between revisions

From Phidgets Support
(Redirected page to Phidget Programming Basics)
 
(159 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Phidgets’ philosophy is that you do not have to be an electrical engineer in order to do projects that use devices like sensors, motors, motor controllers, and interface boards. All you need to know is how to program.
#REDIRECT [[Phidget Programming Basics]]
 
We have developed a complete set of Application Programming Interfaces (API) that are supported for many different [[#Operating System Support|operating systems]], and which can be used through many different [[#Language Support | programming languages]].
 
We suggest starting with the ''Getting Started'' guide [[Device List|for your device]].  This will help you run a basic example to check your hardware and drivers. 
 
The next step would be to choose your [[#Operating System Support|operating system below]], and from there [[#Language Support|choose a language]], learn about [[General Phidget Programming|how to write code for your Phidget]], and get API references for your [[#Language Support|programming language]].
 
The APIs are covered in more detail in the [[General API|API common to all devices]] and the API that pertains to your [[Device List| specific device]].
 
== Operating System Support ==
 
These operating system pages provide drivers for using Phidgets.  They help you set up your system after following the '''Getting Started''' guide [[Device List|for your device]].  The operating systems links below are also on every ''Getting Started'' guide, so if you have not yet read the one for your device, [[Device List|head straight there]].
 
Phidgets can be run either ''directly'' through USB or ''remotely'' over a network via the [[Phidget Webservice]].  Most operating systems below can run Phidgets directly, but a few can only control them over a network.
 
Phidgets can run either directly or over a network on these operating systems:
 
* [[OS - Windows|Windows]] (Windows 2000 or newer)
* [[OS - Mac OSX|Mac OSX]] (OS X 10.4 or newer)
* [[OS - Linux|Linux]] (Kernel 2.6 or newer)
* [[OS - Windows CE|Windows CE]] (5.0 or newer)
* [[OS - Android|Android]] (3.1 or newer)
* [[OS - Phidget SBC]]
 
Phidgets can ''only'' be used over a network by these operating systems:
 
* [[OS - iOS|IPhone iOS]] (3.0 or newer)
* [[OS - Android|Android]] (3.0 or earlier, or no USB port)
 
== Language Support ==
 
We provide a variety of supported languages for using Phidgets.  Each language has its own ''libraries'', which may be found on the language pages below, along with code examples and an in-depth API.
 
Many languages also depend on the ''core drivers'' being installed as well.  These drivers can be found on the [[#Operating System Support|operating system pages]] above.
 
Phidgets supports the following languages.  If you have some flexibility in what language to use, we recommend using a '''Core Language''':
 
{| style="border:1px solid darkgray;" cellpadding="7px;"
|-style="background: #f0f0f0" align=center
! Language || API || Code Samples<sup>&dagger;</sup> || [[General Phidget Programming#Event Driven Code|Events]] || [[General Phidget Programming#Logic Code|Logic Code]] || Use via Direct USB* || [[Phidget Webservice]] || Native Library** || Phidget User Base
|-
 
|'''Core Languages'''
|-
 
|[[File:Icon-CSharp.png|24x24px|link=Language - C Sharp]][[Language - C Sharp|C#]]
|style="background: #94BC91" align=center| All Devices
|style="background: #94BC91" align=center| All Devices
|style="background: #94BC91" align=center| [[File:Checkmark.png]]
|style="background: #94BC91" align=center| [[File:Checkmark.png]]
|style="background: #94BC91" align=center| [[File:Checkmark.png]]
|style="background: #94BC91" align=center| [[File:Checkmark.png]]
|style="background: #94BC91" align=center| [[File:Checkmark.png]]
|style="background: #94BC91" align=center| Extensive
|-
 
|[[File:Icon-C++.png|24x24px|link=Language - C/C++]][[Language - C/C++|C/C++]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Extensive
|-
 
|[[File:Icon-Java.png|24x24px|link=Language - Java]][[Language - Java|Java]]
|style="background: #5EC155" align=center| All Devices
|style="background: #5EC155" align=center| All Devices
|style="background: #5EC155" align=center| [[File:Checkmark.png]]
|style="background: #5EC155" align=center| [[File:Checkmark.png]]
|style="background: #5EC155" align=center| [[File:Checkmark.png]]
|style="background: #5EC155" align=center| [[File:Checkmark.png]]
|style="background: #5EC155" align=center| [[File:Checkmark.png]]
|style="background: #5EC155" align=center| Extensive
|-
 
|[[File:Icon-Python.png|24x24px|link=Language - Python]][[Language - Python|Python]]
|style="background: #DAFFD6" align=center| All Devices
|style="background: #DAFFD6" align=center| All Devices
|style="background: #DAFFD6" align=center| [[File:Checkmark.png]]
|style="background: #DAFFD6" align=center| [[File:Checkmark.png]]
|style="background: #DAFFD6" align=center| [[File:Checkmark.png]]
|style="background: #DAFFD6" align=center| [[File:Checkmark.png]]
|style="background: #DAFFD6" align=center| [[File:Checkmark.png]]
|style="background: #DAFFD6" align=center| Extensive
|-
 
|[[File:Icon-Cocoa.png|24x24px|link=Language - Cocoa]][[Language - Cocoa|Cocoa]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Extensive
|-
 
|[[File:Icon-Visual Basic.png|24x24px|link=Language - Visual Basic 6.0]][[Language - Visual Basic 6.0|Visual Basic 6.0]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Extensive
|-
 
|[[File:Icon-Visual Basic Net.png|24x24px|link=Language - Visual Basic .NET]][[Language - Visual Basic .NET|Visual Basic .NET]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Extensive
|-
 
|'''Mobile Languages'''
|-
 
|[[File:Icon-iOS.png|24x24px|link=Language - ios]][[Language - iOS|iOS]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #fffe98" align=center| InterfaceKit Only
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #e6abab" align=center| X
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Moderate
|-
 
|[[File:Icon-Android.png|24x24px|link=Language - Android]][[Language - Android Java|Android Java]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #fffe98" align=center| InterfaceKit Only
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ffa94f" align=center| 3.1 or Higher Only
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Moderate
|-
 
 
|'''Scripting'''
|-
 
|[[File:Icon-Applescript.png|24x24px|link=Language - Applescript]][[Language - Applescript|Applescript]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Moderate
|-
 
|[[File:Icon-Autoit.png|24x24px|link=Language - AutoIt]][[Language - AutoIt|AutoIt]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #e6abab" align=center| None
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Small
|-
 
|[[File:Icon-Ruby.png|24x24px|link=Language - Ruby]][[Language - Ruby|Ruby]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Small
|-
 
|'''Science and Math'''
|-
 
|[[File:Icon-LabVIEW.png|24x24px|link=Language - LabVIEW]][[Language - LabVIEW|LabVIEW]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Moderate
|-
 
|[[File:Icon-Matlab.png|24x24px|link=Language - Matlab]][[Language - MATLAB|MATLAB]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ffa94f" align=center| [[Language - MATLAB|Some]] Devices
|style="background: #e6abab" align=center| X
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #e6abab" align=center| X
|style="background: #ade6ab" align=center| Moderate (Small?)
|-
 
|[[File:Icon-Simulink.png|24x24px|link=Language - Simulink]][[Language - Simulink|Simulink]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #fffe98" align=center| InterfaceKit Only
|style="background: #e6abab" align=center| X
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #e6abab" align=center| X
|style="background: #ade6ab" align=center| Small
|-
 
 
|'''Multimedia'''
|-
 
|[[File:Icon-Adobe Director.png|24x24px|link=Language - Adobe Director]][[Language - Adobe Director|Adobe Director]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| InterfaceKit Only
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Small
|-
 
|[[File:Icon-Flash AS3.png|24x24px|link=Language - Flash AS3]][[Language - Flash AS3|Flash AS3]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #e6abab" align=center| X
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Extensive
|-
 
|[[File:Icon-Flex AS3.png|24x24px|link=Language - Flex AS3]][[Language - Flex AS3|Flex AS3]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #e6abab" align=center| X
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Moderate
|-
 
|[[File:Icon-LiveCode.png|24x24px|link=Language - LiveCode]][[Language - LiveCode|LiveCode]]
|style="background: #fffe98" align=center| InterfaceKit Only
|style="background: #fffe98" align=center| InterfaceKit Only
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Small
|-
 
|[[File:Icon-MaxMSP.png|24x24px|link=Language - Max/MSP]][[Language - Max/MSP|Max/MSP]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| All Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Moderate
|-
 
 
|'''Other Languages'''
|-
 
|[[File:Icon-CSharp.png|24x24px|link=Language - C Sharp (.NET Compact Framework)]][[Language - C Sharp (.NET Compact Framework)|C# (.NET Compact)]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ffa94f" align=center| Some Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Extensive
|-
 
 
|[[File:Icon-REALBasic.png|24x24px|link=Language - REALBasic]][[Language - REALBasic|REALBasic]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #e6abab" align=center| None
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Small
|-
 
 
|[[File:Icon-Visual Basic for Applications.png|24x24px|link=Language - Visual Basic for Applications]][[Language - Visual Basic for Applications|Visual Basic for Apps]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ffa94f" align=center| Some Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Small
|-
 
|[[File:Icon-Visual Basic Script.png|24x24px|link=Language - Visual Basic Script]][[Language - Visual Basic Script|Visual Basic Script]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ffa94f" align=center| Some Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Small
|-
 
|[[File:Icon-Delphi.png|24x24px|link=Language - Delphi]][[Language - Delphi|Delphi]]
|style="background: #ade6ab" align=center| All Devices
|style="background: #ffa94f" align=center| Some Devices
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| [[File:Checkmark.png]]
|style="background: #ade6ab" align=center| Small
|}
<nowiki>*</nowiki> A direct USB connection would be plugging the Phidget into a USB port and using it locally.  This is the typical way to use a Phidget.  However, some platforms (such as the iPhone platform) do not have USB ports and hence can only use a Phidget over a network, via the [[Phidget Webservice]].
 
<nowiki>**</nowiki> Native library support means that the calls you make to a Phidget in this language are in the language as well.  If the calls are non-native, the use of Phidgets is through an external library linker, such as callib() in MATLAB, for example.  The core Phidget library is written in C, and most other languages use this library as their core, but a 'Native' interface cleanly hides this detail.
 
<sup>&dagger;</sup> Most languages have code samples for all Phidgets, but some have only some devices (visit the language page to learn which ones), and some only have an Interface Kit example. The Phidget Interface Kit is a common Phidget with provides an interface with analog sensors, digital input, and digital output.  So, when we choose which examples to write, the Interface Kit is often at the top of our customer's lists.

Latest revision as of 20:57, 28 February 2019