PhidgetLab

Crossing the Border from Squeak to Real World Objects

News:

the Innovation Technology Awards silver medal 2009-10-04: PhidgetLab is proud to announce that we were awarded with the 2nd price of the esug's Innovation Technology Arards .

2009-09-27: The spanish Linux Magazine wrote about phidgetLab. The article is available here.

2009-08-25: A new version of our software is available now! Download the new phidgetPlugin and install the current sar-files. With this update we support more Phidgets (especially for Etoys - Give the TextLCD a try!). If you encounter any bugs or have any suggestions (or just want to say hello), please let us know.


Have you ever thought about what happens if your Squeak world objects become real world objects? When teaching children about OOP in Squeak they have to imagine objects rather than seeing them in reality.

Phidgets, which are "plug and play" sensors and accessors, are real world objects, which can be controlled via USB.

It would be great if they were accessible from the Squeak environment.

With PhidgetLab it is possible to access several (*) Phidgets from your Squeak image. Using the Core package of PhidgetLab, you have full control over attached Phidgets and are able to write applications using these USB devices. Most Phidget types are already avaliable for the easy-to-use Etoys environment.

Example

Real world / Squeak world interaction We expect servo motors to be used quite often when experimenting with Phidgets. They offer the user the chance to see what was coded in the Squeak world earlier. To get a servo running from Squeak open the objects menu and choose the category Phidgets. Then drag a Servo 1-Motor into your world. Open an Etoys view of the new Servo Morph and select the category Phidget in the recently opened Etoys pane.

Now you see several options you may or may not change. For example the motor's Position may be changed within the interval [MinPosition, MaxPosition].

That way PhidgetLab offers a fast and direct way to access a servo motor from Squeak. We made use of this ability and build a little example: a Marble Maze.

Marble Maze

Marble Maze The Marble Maze is an easy-to-implement but nevertheless illustrative example for PhidgetLab. The goal of this game is to navigate a ball trough a maze with walls and holes. The ball can be controlled by tilting the maze using two axes.

We use two servo motors to control the axes. To control the servos themselves we can use any analog sensor like a joystick, sliders, or an accelerometer. A two-line Etoys script assigns the sensors' values to the servo-positions. That way the user can navigate the ball through the maze.
The Etoys script that controls the Marble Maze

See our Demo Video to see the Marble Maze in action.

Demo Video

Source Code

General Installation Instructions

  1. Install the Phidget21 library from phidgets.com.
  2. Copy the PhidgetPlugin binary:
    • for Windows: Copy PhidgetPlugin.dll into your Squeak executable directory
    • for Linux: Please build your own PhidgetPlugin Library (see: How to Build). Then copy PhidgetPlugin into your Squeak libraries directory
      (for instance "/usr/bin/squeak/3.9-8/")
    • for Mac OS: Unzip PhidgetPlugin.bundle.zip and copy the bundle
      into "Contents/Resources/" of your Squeak application package
  3. Load "MultiColumn Lists-cbc.41.mcz" from SqueakSource
  4. Install the sar-Files (first Core, then Etoys and our examples)
    • To use the Core classes just start coding
      (for further help have a look at the (class) comments of the Phidget-Core classes or our examples)
    • To start using Phidget with Etoys open the objects menu, drag some Phidgets out and explore. You may also watch our demo video.

Things You Need to Get the Phidgets Running (Binaries)

Source Code

Developers

Photo of Developers

Software Architecture Group

License

This Software is licensed under the MIT license. Please read the license.pdf for details.

Get in contact

Leave us a message at our google group or become a member of the phidgetLab mailinglist if you encounter any bugs or want to see new features and phidgets in phidgetLab.

Links


*) currently supported Phidgets are: