Control a servo motor with your phone's gyro sensor by David Tracy http://www.davidptracy.com created Nov 9 2014
This code requires an arduino Yun with node and node ws installed and expanded disk space: http://www.tigoe.com/pcomp/code/arduinowiring/1216/
See the github repo below for server and client code: https://github.com/davidptracy/phoneGyroToMotor
Client code must be copied to the node folder listed in setup to the micro SD for this to work correctly.
This example code is in the public domain.