Haptics Library for Wiring
Last week and next, I'm working on a haptics module for Wiring with Reto, Massimo, and David and Diego Cuartielles. We're trying to make it easy for other people to use force-feedback, as James and I did in our radio (link coming).
Wiring is a board, programming language, and IDE for using electronics in physical computing projects. It was designed as Hernando Barragán's IDII thesis last year. It builds on Processing, a language and IDE for on-screen interactive design. Both tools are wonderful for all sorts of interesting projects.
The project has a few layers: a Wiring API, a serial protocol, a Processing API, and a GUI. My priority is ease-of-use (at the cost of perhaps a bit of efficiency); for example, I'm reporting encoder positions as degrees instead of encoder counts. It's a good challenge to try to create something for designers instead of other programmers. Definitely something I want to do more of.
Here's a quick sample of the sort of functionality I'm working on:
- void attachMotor (int drive0, int drive1)
- Attach a motor to particular pins.
- void addPeak (float angle)
- Adds a peak to the feedback function at angle degress.
- float encoderResolution ()
- Returns the encoder resolution in degrees.
- float encoderAngle ()
- Returns the current position of the encoder.