Dexter Industries has been playing around with the RPi lately, and hooked up a Mindstorms-compatible accelerometer/gyroscope to a RPi running Raspbian. They have a full tutorial showing how they did it.