I recently got this sensor ADXL345, a digital accelerometer. I immediately set out on doing something with this sensor, simple yet not pointless.
The first thing to do is to read the accelerometer values. The sensor supports I2C and SPI. I decided to go with SPI. On reading the sensor values, I classify the sensor reading into three different categories. Sensor pointing along the X, Y or the Z axis. Once this is done, the microcontroller sends either 1, 2 or 3 to the serial port of the PC. On the PC a Processing code is running which receives the value from the serial port. Depending on the received value, the orientation of a cuboid is varied such that the orientation of the cuboid is same as the sensor.
The code running on the Arduino and the Processing code are both available on my GitHub repo.