示例#1
0
文件: Program.cs 项目: Togusa09/Hexy
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            //var serHandler = new serHandler();
            var controller = new Controller(32);
            var hexy = new hexapod(controller);

            Thread.Sleep(2000);

            //hexy.GetUp();
            //hexy.SetZero();

            hexy.Move("GetUp");
            Thread.Sleep(2000);
            hexy.Move("MoveForward");
            Thread.Sleep(2000);
            hexy.Move("MoveForward");

            //hexy.Move("SetZero");
            //Thread.Sleep(500);

            //hexy.Move("GetUp");
            //Thread.Sleep(500);
            //hexy.Move("MoveForward");

            //while (true)
            //{
            //    hexy.Move("MoveForward");
            //    Thread.Sleep(3000);
            //}

            controller.killAll();
        }
示例#2
0
        public override void ExecuteAction(hexapod hexy)
        {
            hexy.Move("SetZero");
            Thread.Sleep(2000);

            hexy.Move("GetUp");
            Thread.Sleep(500);
        }