Ejemplo n.º 1
0
        public MainPage()
        {
            this.InitializeComponent();
            usb = new UsbSerial("VID_2341", "PID_8036");
            List <ConnectTheDotsSensor> sensors_one = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2198a348-e2f9-4438-ab23-82a3930662ac", "Temperature", "F"),
            };

            List <ConnectTheDotsSensor> sensors_two = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ac", "light", "C"),
            };

            List <ConnectTheDotsSensor> sensors_three = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2398a348-e2f9-4438-ab23-82a3930662ac", "humidity", "Lux"),
            };


            arduino              = new RemoteDevice(usb);
            arduino.DeviceReady += onDeviceReady;
            usb.begin(57600, SerialConfig.SERIAL_8N1);

            ctdHelper1 = new ConnectTheDotsHelper(serviceBusNamespace: "*********",//choice the serviceBusNamespace at here like "exampleIoT-ns"
                                                  eventHubName: "ehdevices",
                                                  keyName: "D1",
                                                  key: "**********************",//copy the key which come from D1 connection of "ehdevices"
                                                  displayName: "Temperature",
                                                  organization: "DFRobot",
                                                  location: "Shanghai",
                                                  sensorList: sensors_one);

            ctdHelper2 = new ConnectTheDotsHelper(serviceBusNamespace: "*********",//choice the serviceBusNamespace at here like "exampleIoT-ns"
                                                  eventHubName: "ehdevices",
                                                  keyName: "D2",
                                                  key: "**********************",//copy the key which come from D2 connection of "ehdevices"
                                                  displayName: "light",
                                                  organization: "DFRobot",
                                                  location: "Shanghai",
                                                  sensorList: sensors_two);

            ctdHelper3 = new ConnectTheDotsHelper(serviceBusNamespace: "*********",//choice the serviceBusNamespace at here like "exampleIoT-ns"
                                                  eventHubName: "ehdevices",
                                                  keyName: "D3",
                                                  key: "**********************",//copy the key which come from D3 connection of "ehdevices"
                                                  displayName: "humidity",
                                                  organization: "DFRobot",
                                                  location: "Shanghai",
                                                  sensorList: sensors_three);

            Button_Click(null, null);
        }
Ejemplo n.º 2
0
        public MainPage()
        {
            this.InitializeComponent();
            usb = new UsbSerial("VID_2341", "PID_8036");
            List<ConnectTheDotsSensor> sensors_one = new List<ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2198a348-e2f9-4438-ab23-82a3930662ac", "Temperature", "F"),
            };

            List<ConnectTheDotsSensor> sensors_two = new List<ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ac", "light", "C"),
            };

            List<ConnectTheDotsSensor> sensors_three = new List<ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2398a348-e2f9-4438-ab23-82a3930662ac", "humidity", "Lux"),
            };


            arduino = new RemoteDevice(usb);
            arduino.DeviceReady += onDeviceReady;
            usb.begin(57600, SerialConfig.SERIAL_8N1);

            ctdHelper1 = new ConnectTheDotsHelper(serviceBusNamespace: "*********",//choice the serviceBusNamespace at here like "exampleIoT-ns"
                eventHubName: "ehdevices",
                keyName: "D1",
                key: "**********************",//copy the key which come from D1 connection of "ehdevices"
                displayName: "Temperature",
                organization: "DFRobot",
                location: "Shanghai",
                sensorList: sensors_one);

            ctdHelper2 = new ConnectTheDotsHelper(serviceBusNamespace: "*********",//choice the serviceBusNamespace at here like "exampleIoT-ns"
                eventHubName: "ehdevices",
                keyName: "D2",
                key: "**********************",//copy the key which come from D2 connection of "ehdevices"
                displayName: "light",
                organization: "DFRobot",
                location: "Shanghai",
                sensorList: sensors_two);

            ctdHelper3 = new ConnectTheDotsHelper(serviceBusNamespace: "*********",//choice the serviceBusNamespace at here like "exampleIoT-ns"
                eventHubName: "ehdevices",
                keyName: "D3",
                key: "**********************",//copy the key which come from D3 connection of "ehdevices"
                displayName: "humidity",
                organization: "DFRobot",
                location: "Shanghai",
                sensorList: sensors_three);

            Button_Click(null, null);
        }
Ejemplo n.º 3
0
        public MainPage()
        {
            this.InitializeComponent();
            usb = new UsbSerial("VID_2341", "PID_8036");
            List <ConnectTheDotsSensor> sensors_one = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2198a348-e2f9-4438-ab23-82a3930662ac", "Temperature", "F"),
            };

            List <ConnectTheDotsSensor> sensors_two = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ac", "light", "C"),
            };

            List <ConnectTheDotsSensor> sensors_three = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2398a348-e2f9-4438-ab23-82a3930662ac", "humidity", "Lux"),
            };


            arduino              = new RemoteDevice(usb);
            arduino.DeviceReady += onDeviceReady;
            usb.begin(57600, SerialConfig.SERIAL_8N1);

            ctdHelper1 = new ConnectTheDotsHelper(iotDeviceConnectionString: "HostName=iot-Plant.azure-devices.net;DeviceId=CalvinsRPI;SharedAccessKey=eYGPHgZ0WfuFFH5tS4hj0wwln2wCO2vMaOdymxP38oc=",
                                                  organization: "Calvin",
                                                  location: "Toronto",
                                                  sensorList: sensors_one);

            ctdHelper2 = new ConnectTheDotsHelper(iotDeviceConnectionString: "HostName=iot-Plant.azure-devices.net;DeviceId=CalvinsRPI;SharedAccessKey=eYGPHgZ0WfuFFH5tS4hj0wwln2wCO2vMaOdymxP38oc=",
                                                  organization: "Calvin",
                                                  location: "Toronto",
                                                  sensorList: sensors_two);

            ctdHelper3 = new ConnectTheDotsHelper(iotDeviceConnectionString: "HostName=iot-Plant.azure-devices.net;DeviceId=CalvinsRPI;SharedAccessKey=eYGPHgZ0WfuFFH5tS4hj0wwln2wCO2vMaOdymxP38oc=",
                                                  organization: "Calvin",
                                                  location: "Toronto",
                                                  sensorList: sensors_three);

            Button_Click(null, null);
        }