In this Arduino Tutorial MPU-9250 Orientation Sensor was used. Actually, only accelerometer data was acquired and used to control mouse cursor in air. Please NOTE that Arduino Pro (Micro) or Arduino Leonardo should be used for this purpose.
Download # Arduino Code (*.ino file)
Download # MPU-9250 Library (*.zip file)
Upload Arduino code directly to your Microcontroller from website
If you want to integrate Arduino IDE into your website (as above) sign up here: codebender