1. A method for providing motion sensor data from motion sensors on a motion sensing device to an application program running on the motion sensing device, the method comprising: sampling motion sensor data output by the motion sensors at a first sampling rate, wherein the motion sensors include a plurality of gyroscopes and a plurality of linear motion sensors; wherein the plurality of gyroscopes detect motion and orientation of the motion sensing device itself; storing the motion sensor data in a buffer; and providing an application interface (API) layer which is in communication with the application program, wherein the application program initially sends commands to the API layer to provide settings that set up one or more motion algorithms to run in the background, wherein the settings specify which types of information related to the buffered motion sensor data the application program wants during system operation, wherein the settings indicate to the API layer which of the one or more motion algorithms should run and which of the one or more motion algorithms provide information back to the application program about the device.