Phidget Examples for Delphi

----------------------------------------------------------------------------------------
Requirements:

Supported: Delphi 7, Delphi 2005
Unsupported: Delphi 6 and lower, Delphi 8
Delphi support is based on Phidget21COM.dll - The Phidget 21 COM library

----------------------------------------------------------------------------------------
Usage:

1. Open Delphi and install the correct PhidgetEvents.bpl for your version of Delphi (Either PhidgetEvents - Delphi 7.bpl, 
   PhidgetEvents - Delphi 2005.bpl). Select the Component Menu item and then click on the  by choosing "Install Packages..." 
   from the Component menu, and clicking on the "Add..." button.
2. Open the example project that you have download from the Phidgets website.

If you are creating a new project you will need to:
3. Add Phidget21COM_TLB.pas and Phidget21COMEvents.pas to your project
4. Add Phidget21COMEvents, Phidget21COM_TLB to your uses statement

Explained a bit more:

To get started with Phidgets and Delphi you must include the Phidget21COM_TLB.pas file found in the Delphi folder into your project - This will give you access to phidgets. If you need to use events, which you most likely will, then you should also include Phidget21COMEvents.pas

Once those two files are referenced, you have to add them to your uses statement in the following order: Phidget21COMEvents, Phidget21COM_TLB

You now have access to Phidgets and their events.

In order to make the events easier to use, you can access them as ActiveX components in the toolbox. 

To access the Phidget ActiveX library, choose "Component->Install Packages...", click the 'Add...' button, and select the correct .bpl file (Either PhidgetEvents - Delphi 7.bpl, PhidgetEvents - Delphi 2005.bpl).

This component package must be installed before you try to open the examples, or they will complain about missing components.

At this point you should be able to open the Examples. They are probably your best starting point to using Phidgets with Delphi.

----------------------------------------------------------------------------------------
Basic Example Usage:

To control something, create an instantiantion of it's class, and open the device:

var
	Servo : IPhidgetServo;

...

begin
	Servo:=CoPhidgetServo.Create;
	servo.Open(false,-1);
end;

If you are dealing with events, you will want to connect them to your object before you open it, so as to not miss any events:

var
	Servo : IPhidgetServo;
    	Phidget21COMIPhidgetServoEvents1: TPhidget21COMIPhidgetServoEvents;

...

begin
	Servo:=CoPhidgetServo.Create;
    	Phidget21COMIPhidgetServoEvents1.Connect(Servo1);
	servo.Open(false,-1);
end;

More complete examples are included for the Interfacekit, the RFID reader and the Servo Controller.

----------------------------------------------------------------------------------------
Other considerations:


Some advice for older versions of Delphi:

-You might need to recreate Phidget21COM_TLB.pas
-You could try recreating the phidget.blp package installer. To do this, you just need to create a new package and add "phidget_TLB.pas" and "PhidgetEvents.pas" into the project, then compile. I'm not sure how far back Delphi has support for Package type projects.
-You might be able to install the ActiveX Controls (components) without using a package installer: See the privious point - "More about the ActiveX components (Events)"
