A motion detection apparatus includes an inertia motion detection section which detects an inertia motion of an object to be measured by using at least one of an acceleration sensor or an angular velocity sensor. The first and second electrodes are separately disposed on the epitaxial layer structure, and the epitaxial layer structure has a root-means-square roughness less than about 3 at a surface whereon the first electrode is formed. The application programming interface facilitates communication between the device driver module and a target code module.