Updated accel+mag code with functions to work one axis at a time