piggy: added code for reading the values from accelerometer.