
Thanks to the open source Unimotion library by Lincoln Ramsay, I have developed a java native interface that allows access to the Apple Sudden Motion Sensor available in powerbooks (and macbooks) since 2005.
Download the library sms.zip. Source code for unimotion.c and Unimotion.java is contained in the src directory.
Available functions:
// Return x, y, and z values as array public static int[] getSMSArray(); // Return just the X public static int getSMSX(); // Return just the Y public static int getSMSY(); // Return just the Z public static int getSMSZ();
Example code:
import sms.*; void setup() { size(200,200); } void draw() { int[] vals = Unimotion.getSMSArray(); println(vals[0] + " " + vals[1] + " " + vals[2]); }
History of Motion
Pingback: dasAutomat.com » Blog Archive » Analog Laptop Extension: Marionette
Pingback: color fun at Syed Salahuddin
Pingback: The Apple Sudden Motion Sensor (SMS) to Flash | labs.boulevart
Pingback: URBANGAP | URBANBLOG: web, multimedia e non solo » Tilt SCREAM Pong
Pingback: angry-pixel » Blog Archive » aliens hate cows
Pingback: the King of Catan » Blog Archive » sudden Motion Sensor
Pingback: David Steele Overholt | Research: Testing Kit
Pingback: Your Macbook has an accelerometer. | brunokruse