@@ -0,0 +1,560 @@
+import os%0Aimport sys%0Aimport threading%0Aimport time%0Aimport numpy as np%0Asys.path.append(os.getcwd())%0Asys.path.append('/media/bat/DATA/Baptiste/Nautilab/kite_project/robokite/ObjectTracking')%0Aimport mobileState%0Aimport serial%0Amobile = mobileState.mobileState()%0Aa = threading.Thread(None, mobileState.mobileState.checkUpdate, None, (mobile,))%0Aa.start()%0Aser = serial.Serial('/dev/ttyACM1', 9600)%0Adt = 0.1%0Atime.sleep(dt)%0Aser.write('i1')%0Awhile True:%0A    mobile.computeRPY()%0A    ser.write(str(np.floor(100*mobile.roll/3)/100.0))%0A    print mobile.roll%0A    time.sleep(dt)%0A

Add a script to be able to control the motor based on mobile phone inclination. This can be used to control the kite while launching it if alone