/// <summary> /// Opens up the connection to this Kinect device /// </summary> public void Open() { int result = KinectNative.freenect_open_device(KinectNative.Context, ref this.devicePointer, this.DeviceID); if (result != 0) { throw new Exception("Could not open connection to Kinect Device (ID=" + this.DeviceID + "). Error Code = " + result); } // Create child instances this.LED = new LED(this); this.Motor = new Motor(this); this.Accelerometer = new Accelerometer(this); this.VideoCamera = new VideoCamera(this); this.DepthCamera = new DepthCamera(this); //Register the device KinectNative.RegisterDevice(this.devicePointer, this); // Open now this.IsOpen = true; }