private void button_Click(object sender, RoutedEventArgs e)
        {
            // Create Firmata
            this.mkr1000_firmata = new UwpFirmata();

            //Create MKR1000 Device
            mkr1000 = new Microsoft.Maker.RemoteWiring.RemoteDevice(mkr1000_firmata);

            //Establish a network serial connection. change it to the right IP address and port
            wificonnection = new Microsoft.Maker.Serial.NetworkSerial(new Windows.Networking.HostName("192.168.1.42"), 3030);

            //Attach event handlers
            wificonnection.ConnectionEstablished += NetWorkSerial_ConnectionEstablished;
            wificonnection.ConnectionFailed += NetWorkSerial_ConnectionFailed;

            //Begin Firmata
            mkr1000_firmata.begin(wificonnection);

            //Begin connection
            wificonnection.begin(115200, Microsoft.Maker.Serial.SerialConfig.SERIAL_8N1);
        }
Example #2
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            // Create Firmata
            this.mkr1000_firmata = new UwpFirmata();

            //Create MKR1000 Device
            mkr1000 = new Microsoft.Maker.RemoteWiring.RemoteDevice(mkr1000_firmata);

            //Establish a network serial connection. change it to the right IP address and port
            wificonnection = new Microsoft.Maker.Serial.NetworkSerial(new Windows.Networking.HostName("192.168.1.42"), 3030);

            //Attach event handlers
            wificonnection.ConnectionEstablished += NetWorkSerial_ConnectionEstablished;
            wificonnection.ConnectionFailed      += NetWorkSerial_ConnectionFailed;

            //Begin Firmata
            mkr1000_firmata.begin(wificonnection);

            //Begin connection
            wificonnection.begin(115200, Microsoft.Maker.Serial.SerialConfig.SERIAL_8N1);
        }