コード例 #1
0
        static void Main(string[] args)
        {
            //var Receiver = new SerialPortReceiver(new ArduinoMachine());
            //Receiver.PortName = "COM3";
            //Receiver.BaudRate = 9600;
            //Receiver.Parity = Parity.None;
            //Receiver.DataBits = 8;
            //Receiver.StopBits = StopBits.One;
            //Receiver.Handshake = Handshake.None;
            //Receiver.Connect();
            //Dash.AddReceiver(Receiver);

            //var Receiver1 = new CustomAIDataReceiver(new AIMachine("AI1", "Yapay Makine 1"));
            //Receiver1.Connect();
            //Dash.AddReceiver(Receiver1);
            //var Receiver2 = new CustomAIDataReceiver(new AIMachine("AI2", "Yapay Makine 2"));
            //Receiver2.Connect();
            //Dash.AddReceiver(Receiver2);

            var Receiver = new HIDReceiver(new GamePadMachine());

            Receiver.VendorId  = 0x0810;
            Receiver.ProductId = 0xe501;
            Receiver.Connect();

            //var Receiver = new HIDReceiver(new BluetoothMachine());
            //Receiver.VendorId = 0X0E8F;
            //Receiver.ProductId = 0x00A8;
            //Receiver.Connect();
            Console.ReadLine();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: HakanUcaar/Dakota
        static void Main(string[] args)
        {
            var Receiver = new HIDReceiver(new GamePadMachine());

            Receiver.VendorId  = 0x0810;
            Receiver.ProductId = 0xe501;

            Client            = new SigalRClient(Receiver);
            Client.URL        = "http://localhost:13000/";
            Client.HubName    = "DataHub";
            Client.MethodName = "Receive";
            Client.Connect();

            Client.StartReceiver();

            //Test();
        }