example for accelerometer
added import statement
added self. at places