Friday, July 13, 2007

Interface Details

This is the details of how the interface works.
The computer runs a visual basic program with command buttons which can be activated by voice or by clicks (read my previous posts about the voice control). Each command button contains an instruction which tells the Phidgets 0/16/16 Interface Kit which outputs to initiate.
The Phidgets Serial Interface is a really cool device. It connects to your USB port and has 16 digital inputs and 16 digital outputs with LED indicators by each pin. A simple command is sent to the USB port in the visual basic program to turn on an output or to detect an input. A sample command is "IFKit.OutputState(0) = True" to turn on pin 0. There is more code that must be done to set up the Phidgets though. It took me a half hour to figure out how to use Phidgets and another 3 hours to find out why my program wasn't working( I hadn't added the Phidgets Library as a reference in Visual Basic 6.
After that it was just making the program more visual and more effective. I put in a timer( not the standard one, I used the ccrpTimer ,you can find it online for Visual Basic) to control the outputs so that the robot will only go forward for 5 seconds and then stop, instead of it continuously going forward. Then I added a video feed from my Logitech Quickcam and some other minute fixes to the program.
You can find sample programs for Phidgets online by TrossenRobotics as well as prices for different Phidgets. I got all digital interface with 32 pins for 100 bucks. It was well worth it.
Please Email me if you have any questions or comments.

1 comment:

Steve said...

Thank you for the details. I will probably use the same type of interface in my flight simulator. I intend to build it this year and I saw the Phidgets thing and just wanted to see some examples.