What is a Phidget?: Difference between revisions

From Phidgets Support
No edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Overview]]
[[Category:Overview]]
__NOTOC__
At Phidgets, our philosophy is that you don't have to be an electrical engineer in order to create sophisticated projects using motors, sensors and other electronics. You simply need to know how to code.


==Introduction==
 
Phidgets are building-blocks for sensing and control using a computer, tablet, or phone. Users create applications that use Phidgets to interact with the physical world. Phidgets connect via a USB port:
Phidgets are building-blocks for sensing and control using a computer, tablet, or phone. Phidgets enable your software application to interact with the physical world.
 
[[File:HUB0000 with LED Image.jpg|link=|250px]]  [[File:RFID Image.jpg|link=|250px]]  [[File:STC1000 with Motor Image.jpg|link=|300px]]
 
[[File:NoBreadboard.jpg|right|link=|180px]]
 
 
The advantage of using Phidgets is that all Phidgets can be plugged in and used in your project out of the box, without having to follow complex pinout diagrams or configure communication between the device and computer. With Phidgets, we deal with the details of getting the electronics behaving as they should, so you can focus on the programming and details of your final product.
<br clear="all">
==Hardware Introduction==
 
Phidgets connect via a USB port:
[[Image:wiap-image1.jpg|500px|link=|alt=|center]]
[[Image:wiap-image1.jpg|500px|link=|alt=|center]]


Line 8: Line 21:
----
----


Some Phidgets are a complete, self-contained sensing package. An example is then [{{SERVER}}/products.php?product_id=1042 1042]
Some Phidgets are a complete, self-contained sensing package. An example is the [{{SERVER}}/products.php?product_id=1042 1042]
, which measures motion:
, which measures motion:
[[Image:wiap-image2-spatial.jpg|500px|link=|alt=|center]]
[[Image:wiap-image2-spatial.jpg|500px|link=|alt=|center]]
Line 21: Line 34:
----
----


Another Phidget may be a flexible I/O board which can receive analog sensor data and control digital inputs and outputs. An example is the [{{SERVER}}/products.php?product_id=1018 1018], with eight ports of each type:
[[Image:wiap-image2-ifkt.jpg|700px|link=|alt=|center]]


----
Finally, a Phidget may be a [{{SERVER}}/?view=comparetable&rel=VINTHub VINT Hub], made up of versatile ports that can be used as inputs or outputs, and also connect to smart [[What_is_VINT?|VINT]] devices.
 
 
Finally, a Phidget may be a [{{SERVER}}/products.php?product_id=HUB0000 VINT Hub], made up of versatile ports that can be used as inputs or outputs, and also connect to smart [[What_is_VINT?|VINT]] devices.
[[Image:wiap-vint.jpg|700px|link=|alt=|center]]
[[Image:wiap-vint.jpg|700px|link=|alt=|center]]
==Data Flow==
Data and control flows up and down the USB connection:
[[Image:wiap-dataflow.jpg|700px|link=|alt=|center]]
== Software Channels ==
A Phidget device exports one or more channels.  Each device channel implements a channel class where that class defines the interface used to access the features of the device in a generic fashion.  For example, a Phidget device that supports sensing voltage exports a channel that implements the VoltageInput class.  The VoltageInput class defines the methods, properties, events and errors relevant to receiving voltage data.
[[Image:voltageInput_object.jpg|300px|link=|alt=|center]]
You can check the {{Phidget22API}} for details about channel classes. For example, the [{{SERVER}}/products.php?product_id=1018 1018] has five channels (with five distinct channel classes):
[[Image:1018_objects.jpg|600px|link=|alt=|center]]
Each Phidget channel class inherits common functionality from the base Phidget class.  The Phidget class defines methods like {{Code|open()}} and {{Code|close()}}, and properties like {{Code|DeviceSerialNumber}}.
To help understand the concepts above, we have included a simple C# program that can be used with the [{{SERVER}}/products.php?product_id=1018 1018].
<syntaxhighlight lang=csharp>
using Phidget22;
int main() {
    VoltageInput vin;            // A user channel of the class VoltageInput
    vin = new VoltageInput();    // Create an instance of the class   
    vin.Channel = 0;            // Specify the index of the device channel to attach to
    vin.Open(5000);              // Begin attempting to attach to the device channel
    System.Console.WriteLine("My channel 0 sensor reads " + vin.Voltage); // Get the voltage value
    vin.Close();                // Close the channel, which detached it from the device channel
}
</syntaxhighlight>


==Programming==
==Programming==


For the most part, using Phidgets requires writing software. The {{Phidget22API}} is available in many different programming languages:
For the most part, using Phidgets requires writing software. The '''Phidgets API''' is available in many different programming languages:
 
{| style="border:1px solid darkgray;" cellpadding="5px;"
|-style="background: #f0f0f0" align=center
|-
 
|'''Core Languages''' || |'''Mobile Languages''' || |'''Other Languages'''
|-
|[[Image:Icon-CSharp.png|alt=C Sharp|24x24px|link=Language - C Sharp]] [[Language - C Sharp|C#]] || [[Image:Icon-ObjC.png|24x24px|alt=Objective C|link=Language - Objective C]] [[Language - Objective C|Objective C]] || [[Image:Icon-LabVIEW.png|alt=LabVIEW|24x24px|link=Language - LabVIEW]] [[Language - LabVIEW|LabVIEW]]
|-
|[[Image:Icon-C++.png|alt=C/C++|24x24px|link=Language - C/C++]] [[Language - C/C++|C/C++]] || |[[Image:Icon-Swift.png|alt=Swift|24x24px|link=Language - Swift]] [[Language - Swift|Swift]] || |[[Image:Icon-MaxMSP.png|24x24px|alt=Max/MSP|link=Language - Max/MSP]] [[Language - Max/MSP|Max/MSP]]
|-
|[[Image:Icon-Python.png|alt=Python|24x24px|link=Language - Python]] [[Language - Python|Python]]
|-
|[[Image:Icon-Java.png|alt=Java|24x24px|link=Language - Java]] [[Language - Java|Java]]
|-
|[[Image:Icon-Visual Basic Net.png|alt=Visual Basic .NET|24x24px|link=Language - Visual Basic .NET]] [[Language - Visual Basic .NET|Visual Basic .NET]]
|-
|[[Image:Icon-Javascript.png|alt=JavaScript|24x24px|link=Language - JavaScript]] [[Language - JavaScript|JavaScript]]
|-
|}


{{Programming Languages Table}}


The Phidget software libraries are supported on a number of operating systems:
The Phidget software libraries are supported on a number of operating systems:
Line 98: Line 51:
|'''Desktop OSes''' || |'''Mobile/Wireless OSes'''
|'''Desktop OSes''' || |'''Mobile/Wireless OSes'''
|-
|-
|[[Image:Icon-Windows.png|alt=OS - Windows|24x24px|link=OS - Windows]][[OS - Windows|Windows]] || |[[Image:Icon-Linux.png|alt=OS - Phidget SBC|24x24px|link=OS_-_Phidget_SBC]][[OS_-_Phidget_SBC|Phidget SBC]]
|[[Image:Icon-Windows.png|alt=OS - Windows|24x24px|link=OS - Windows]][[OS - Windows|Windows]] || |[[Image:Icon-Phidgets.png|alt=OS - Phidget SBC|24x24px|link=OS_-_Phidget_SBC]][[OS_-_Phidget_SBC|Phidget SBC]]
|-
|-
|[[Image:Icon-Linux.png|alt=OS - Linux|24x24px|link=OS - Linux]][[OS - Linux|Linux]] || [[Image:Icon-iOS.png|alt=OS - iOS|link=OS - iOS|24x24px|link=OS - iOS]][[OS - iOS|iOS]]   
|[[Image:Icon-Linux.png|alt=OS - Linux|24x24px|link=OS - Linux]][[OS - Linux|Linux]] || [[Image:Icon-iOS.png|alt=OS - iOS|link=OS - iOS|24x24px|link=OS - iOS]][[OS - iOS|iOS]]   
|-
|-
|[[Image:Icon-Mac-OS.png|alt=OS - OS X|24x24px|link=OS - OS X]][[OS - OS X|OS X]] <!--|| [[Image:Icon-Android.png|alt=OS - Android|link=OS - Android|24x24px|link=OS - Android]][[OS - Android|Android]]
|[[Image:Icon-Mac-OS.png|alt=OS - OS X|24x24px|link=OS - OS X]][[OS - OS X|OS X]] || [[Image:Icon-Android.png|alt=OS - Android|link=OS - Android|24x24px|link=OS - Android]][[OS - Android|Android]]
-->
|}
|}


== Network Server ==
== Network Server ==
Not only can you control a Phidget locally, but we also provide a tool called the [[Phidget Network Server]]. The Network Server exports your Phidget's channels over your local network:
 
Using the Phidgets API, applications on remote computers, phones, and [[OS_-_Phidget_SBC|Single Board Computers]] can attach to Phidget devices over the network as if they were local.  This includes WWW based applications using the Phidget JavaScript library.
[[Image:NetworkServer_PhidgetServer.jpg|link=|800px|center]]
[[Image:NetworkServer_PhidgetServer.jpg|link=|800px|center]]
This allows other computers on your network to control the Phidget or read data from it. The network server isn't limited to desktop computers- it can also be used with phones or [[OS_-_Phidget_SBC|Single Board Computers]] that are running Phidgets code.
The Network Server also includes the [[Phidget Dictionary]], which is a central place to store your data in key-value pairs.


== Further Reading ==
== Further Reading ==
Line 120: Line 67:


We encourage customers to not only build projects for themselves, but also to design and build real-world products using Phidgets.  Our libraries can be distributed with your code to your customers.
We encourage customers to not only build projects for themselves, but also to design and build real-world products using Phidgets.  Our libraries can be distributed with your code to your customers.
And this can all occur with the same devices, and the same flexible software API.


Want to learn more?  Check out our:
Want to learn more?  Check out our:
* [{{SERVER}} Products on our main website]
* [{{SERVER}} Products on our main website]
* [[Software Overview | Languages and Operating Systems]]
* [[Phidget Programming Basics]]
* [{{SERVER}}/?view=articles Example Projects and Articles]
* [{{SERVER}}/?view=articles Example Projects and Articles]
* [[:Category:Primer|In-depth hardware information]]


Questions?  Please {{ContactUs|contact us}}.
Questions?  Please {{ContactUs|contact us}}.

Latest revision as of 14:50, 26 June 2019


At Phidgets, our philosophy is that you don't have to be an electrical engineer in order to create sophisticated projects using motors, sensors and other electronics. You simply need to know how to code.


Phidgets are building-blocks for sensing and control using a computer, tablet, or phone. Phidgets enable your software application to interact with the physical world.

HUB0000 with LED Image.jpg RFID Image.jpg STC1000 with Motor Image.jpg

NoBreadboard.jpg


The advantage of using Phidgets is that all Phidgets can be plugged in and used in your project out of the box, without having to follow complex pinout diagrams or configure communication between the device and computer. With Phidgets, we deal with the details of getting the electronics behaving as they should, so you can focus on the programming and details of your final product.

Hardware Introduction

Phidgets connect via a USB port:



Some Phidgets are a complete, self-contained sensing package. An example is the 1042 , which measures motion:



Other Phidgets are a 'building block' to use other sensors. An example is the 1048 which allows the use of wire thermocouples:




Finally, a Phidget may be a VINT Hub, made up of versatile ports that can be used as inputs or outputs, and also connect to smart VINT devices.

Programming

For the most part, using Phidgets requires writing software. The Phidgets API is available in many different programming languages:

Core Languages Mobile Languages Other Languages
C Sharp C# Objective C Objective C LabVIEW LabVIEW
C/C++ C/C++ Swift Swift Max/MSP Max/MSP
Python Python Android Android Java
Java Java
Visual Basic .NET Visual Basic .NET
JavaScript JavaScript

The Phidget software libraries are supported on a number of operating systems:

Desktop OSes Mobile/Wireless OSes
OS - WindowsWindows OS - Phidget SBCPhidget SBC
OS - LinuxLinux OS - iOSiOS
OS - OS XOS X OS - AndroidAndroid

Network Server

Using the Phidgets API, applications on remote computers, phones, and Single Board Computers can attach to Phidget devices over the network as if they were local. This includes WWW based applications using the Phidget JavaScript library.

NetworkServer PhidgetServer.jpg

Further Reading

With the combination of events, modular sensors, and network support, your system can range from simple to incredibly complex.

We encourage customers to not only build projects for themselves, but also to design and build real-world products using Phidgets. Our libraries can be distributed with your code to your customers.

Want to learn more? Check out our:

Questions? Please contact us.