Phidgets

CPSC781.Phidgets History

Hide minor edits - Show changes to markup

Deleted line 19:
Deleted lines 80-86:

Hello World Examples

  • The link to the example(s) in class and further hello world examples will go here soon!
Added lines 1-2:
Changed lines 11-12 from:

Abstract text about phidgets will appear here soon!

to:

Phidgets are a set of "plug and play" building blocks for low cost USB sensing and control from your PC.

Added lines 1-97:


Attach:phidgets.jpg Abstract text about phidgets will appear here soon!

Contents



Download and Installation

Here are the steps to setup the proper environment and get the necessary files:

  • The Phidget installer requires that your system has .NET framework 2.0 or higher.
    • The .NET framework can be downloaded from http://www.microsoft.com/net
  • Visit the drivers section at http://www.phidgets.com and get the latest Phidget framework for your operating system.
    • http://www.phidgets.com/docs/Operating_System_Support
    • The latest versions for Windows 32-bit, 64-bit
  • Follow the steps bellow to install the framework:
    • Open up the installer, and proceed through the wizard. Please note that by default, the installer places the Phidget libraries in C:\Program Files\Phidgets.
    • Once the Phidget libraries are installed using the installer, you should see the Phidget icon in the taskbar. Double click on it to bring up the Phidget Control Panel. If the icon does not appear, just find and open the Phidget Control Panel from the start menu.
  • You need the following basic components to get started with programming Phidgets:
    • A Phidget and all the necessary parts (for example if using an InterfaceKit, you also need a sensor to get input)
    • A USB cable
  • Using the USB cable, connect your Phidget to your PC
  • Once the Phidget is connected, it will show up under the General tab of the Phidget Control Panel. This is an indication that your Phidget is connected correctly.
  • Now you are ready to continue to the Recipes and How-To's section.

Recipes and How-To's

Here are the instructions for setting up the programming environment in C#:

  • Generate a new C# Windows Application with a descriptive name such as PhidgetHelloWorld.
  • Launch the Add Reference window (Project -> Add Reference).
  • Under the .NET tab, select the most recent Phidget21.NET library. If it does not appear in this list, then you can Browse to the Phidget Framework installation directory and add the Phidget21.NET.dll. For earlier versions of Visual Studio, you will want to use the Phidget21.NET1.1.dll instead.
  • Now you have access to all the great libraries and classes that are needed to use Phidgets. To add a reference to the libraries type:
 
 using Phidgets;
 using Phidgets.Events;
  • It is recommended to download/run the examples in C# and follow the tutorials.
  • The same with any API, you need to check the API documentation witch is available online and also downloadable.
    • Links are provided under the Links section.

Tutorials and Examples

  • Getting Started with c# Tutorial
  • An older version of the Tutorial
  • C# simple and full examples
    • Some phidgets have several examples of how to use them: a very simple one that shows basic functionality, another one that exercises almost all its properties, and a 3rd that illustrates its skin in action. This is a very valuable resource for learning how to code Phidgets.
    • While these examples were written in Visual Studio 2005 and 2008, Visual Studio 2010 will easily open and upgrade them.
    • Note that due to the way Phidgets are designed, if you try to access a single Phidget through two programs at the same time confusing things may happen.
    • Finally, if you run and stop one program controlling a Phidget, you may have to wait a moment or two (or quit and restart the demo program) before you can use the second program (the 2nd program may not connect to the Phidget).

Hello World Examples

  • The link to the example(s) in class and further hello world examples will go here soon!

Links

  • Phidget Inc.
  • .NET API Manual Online
  • Download API Manual
  • Videos of the projects worked by the students