to read accelerometer and print to serial