motor control with tilt sensor