Exemplo n.º 1
0
        private static IPi2GoLiteRobot BuildLocalRobot()
        {
            IOperatingSystemService operatingSystemService = new ClassicDotnetOperatingSystemService();
            IGpioPort gpioPort =
                new DmaLinuxGpioPort(operatingSystemService);

            //new SysfsLinuxGpioPort(operatingSystemService);

            return(RobotBuilder.BuildPi2GoLite(operatingSystemService, gpioPort));
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var operatingSystemService = new ClassicDotnetOperatingSystemService();
            //var gpioPort = new LogGpioPort(Console.Out);
            var gpioPort = new DmaLinuxGpioPort(operatingSystemService);

            // create robot
            var robot = RobotBuilder.BuildPi2GoLite(operatingSystemService, gpioPort);

            robot.Setup();

            using (new Pi2GoWebSocketServer(robot, 81, new ImageCapture(), Console.Out))
            {
                Console.WriteLine("Server started");
                Console.WriteLine("Press any key to quit.");
                Console.ReadKey(true);
            }
        }