         
         self.SocketConn = SocketConnection()
         
+       
+        
+        
+        //
+        //        var timer = NSTimer.scheduledTimerWithTimeInterval(0.05, target: self, selector: Selector("updateJoystickCoordinates:"), userInfo: nil, repeats: true)
+        
+        self.timer = NSTimer.scheduledTimerWithTimeInterval(0.05, target: SocketConn!, selector: Selector("sendValue:"), userInfo: joystick, repeats: true)
         // Do any additional setup after loading the view, typically from a nib.
         
-        
-        
-//        
-//        var timer = NSTimer.scheduledTimerWithTimeInterval(0.05, target: self, selector: Selector("updateJoystickCoordinates:"), userInfo: nil, repeats: true)
-        
-        self.timer = NSTimer.scheduledTimerWithTimeInterval(0.05, target: SocketConn!, selector: Selector("sendValue:"), userInfo: joystick, repeats: true)
-        
-    }
-    
-    deinit {
-        print("deIniting")
-        // perform the deinitialization
     }
     
     override func viewDidDisappear(animated: Bool) {
         print("view disappeared")
         self.SocketConn!.closeStream()
         self.timer.invalidate()
-      
-       
-        
-       
-        
     }
     
     override func didReceiveMemoryWarning() {

    override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
        return .Landscape
    }
    
    func updateJoystickCoordinates(timer:NSTimer){
        

    var green: CGFloat = 0.0
    var blue: CGFloat = 0.0
    var timer = NSTimer()

    
    override func viewDidLoad() {
        super.viewDidLoad()
