code for interfacing with accelerometer and detecting steps