Add motion and direction sensing to your wearable project with this high precision 3-axis Accelerometer+Compass sensor. Inside are two sensors, one is a classic 3-axis accelerometer, which can tell you which direction is down towards the Earth (by measuring gravity) or how fast the board is accelerating in 3D space. The other is a magnetometer that can sense where the strongest magnetic force is coming from, generally used to detect magnetic north. By combining this data you can then orientate yourself.
This sensor is based on the latest version of this popular sensor, the LSM303DLHC. The sensor has a digital (I2C) interface. Attaching it to a Lilypad is simple: line up the sensor so its adjacent to the SDA/SCL pins and sew conductive thread from the 3V, SDA, SCL and GND pins. You can only connect one of these sensors to your Lilypad, but you can connect other I2C sensors/outputs.