Manual
Table Of Contents
- Product Features
- Installing the hardware
- Downloading and Installing the software
- Programming a Phidget
- Technical Section
- The PhidgetAdvancedServo software component uses degrees to specify position, velocity, and acceleration. The degree unit is translated into a pulse sent to the servo, but it’s up to the servo to translate this signal into a particular position. This translation varies between servo models and manufacturers so our degree abstraction will not be exactly the same as the servo you are using. Our degree abstraction is based on the HS322-HD servo, which is typically 10.4uS per degree.
- API Section
- We document API calls specific to the 1066. Functions common to all Phidgets are not covered here. This documentation is deliberately generic. For calling conventions in a specific language, refer to that language’s API manual.
- Device Specifications
- Mechanical Drawing
- Product History
1066_0_Product_Manual created: 07/09/09 Page 5
Programming a Phidget
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. We have developed a complete set of Application Programming
Interfaces (API) that are supported for Windows, Mac OS X, and Linux. When it comes to
languages, we support VB6, VB.NET, C#.NET, C, C++, Flash 9, Flex, Java, LabVIEW, Python,
Max/MSP, and Cocoa.
Architecture
We have designed our libraries to give you the maximum amount of freedom. We do not
impose our own programming model on you.
To achieve this goal we have implemented the libraries as a series of layers with the C API at
the core surrounded by other language wrappers.
Libraries
The lowest level library is the C API. The C API can be programmed against on Windows, CE,
OS X and Linux. With the C API, C/C++, you can write cross-platform code. For systems with
minimal resources (small computers), the C API may be the only choice.
The Java API is built into the C API Library. Java, by default is cross-platform - but your
particular platform may not support it (CE).
The .NET API also relies on the C API. Our default .NET API is for .NET 2.0 Framework, but
we also have .NET libraries for .NET 1.1 and .NET Compact Framework (CE).
The COM API relies on the C API. The COM API is programmed against when coding in VB6,
VBScript, Excel (VBA), Delphi and Labview.
The ActionScript 3.0 Library relies on a communication link with a PhidgetWebService (see
below). ActionScript 3.0 is used in Flex and Flash 9.
Programming Hints
Every Phidget has a unique serial number - this allows you to sort out which device is which •
at runtime. Unlike USB devices which model themselves as a COM port, you don’t have
to worry about where in the USB bus you plug your Phidget in. If you have more than
one Phidget, even of the same type, their serial numbers enable you to sort them out at
runtime.
Each Phidget you have plugged in is controlled from your application using an object/handle •
specific to that phidget. This link between the Phidget and the software object is created
when you call the .OPEN group of commands. This association will stay, even if the Phidget
is disconnected/reattached, until .CLOSE is called.
The Phidget APIs are designed to be used in an event-driven architecture. While it is •
possible to poll them, we don’t recommend it. Please familiarize yourself with event
programming.
Networking Phidgets
The PhidgetWebService is an application written by Phidgets Inc. which acts as a network
proxy on a computer. The PhidgetWebService will allow other computers on the network
to communicate with the Phidgets connected to that computer. ALL of our APIs have the