Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            device = Model1.GetDevice("COM6", 9600, 1);

            device.OnCompasChange += Device_OnCompasChange;
            device.OnConnect      += Device_OnConnect;
            device.Connect();
            device.Reset();

            Console.WriteLine("Waiting for device...");
            while (!device.IsReady)
            {
                System.Threading.Thread.Sleep(1000);
            }

            device.Enable();

            device.SetPosition(0.0, 0.0);
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
            Console.WriteLine("Time to exit.");

            device.Disconnect();
        }