Esempio n. 1
0
        static void Main(string[] args)
        {
            Arm lynx = new Arm();
            //open ports

            // Instantiate the communications
            // port with some basic settings
            SerialPort port = new SerialPort("COM5", 115200, Parity.None, 8, StopBits.One);

            // Open the port for communications
            port.Open();
            Console.WriteLine("Port open Sending first pos");

            lynx.gotoSleep(4000, port);
            Console.ReadLine();
            lynx.gotoSleep(4000, port);

            Console.WriteLine("First sequence sent");
            Console.ReadLine();
            Console.WriteLine("opening Link");
            Kinect vision = new Kinect(lynx,port);

            port.Close();
            Console.ReadLine();
        }
Esempio n. 2
0
        public Kinect(Arm arm, SerialPort p)
        {
            angle = new float[1];
            finglims = new double[3] { 0.0, 1.37, 1.8 };
            //kneexlims = new double[3] { -0.07, 0, 0.07 };
            kneexlims = new double[3] { 0.1, 0, 0.3 };
            brotlims =new double[3]{-90, 0, 90};
            xslidelims = new double[3]{-0.5, 0, 0.5};

            //Kinect p = new Kinect();
            port = p;
            lynx = arm;
            kinectInit();

            //string tests = string.Format("a :{0} , b : {1}", a, b);

            Console.WriteLine("Kinect ïnitialised");
            Console.ReadLine();
        }