コード例 #1
0
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List<ConnectTheDotsSensor> sensors = new List<ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ab", "Light", "L"),
                new ConnectTheDotsSensor("d93ffbab-7dff-440d-a9f0-5aa091630201", "Temperature", "C"),
            };
            
            ctdHelper = new ConnectTheDotsHelper(serviceBusNamespace: "SERVICE_BUS_NAMESPACE",
                eventHubName: "EVENT_HUB_NAME",
                keyName: "SHARED_ACCESS_POLICY_NAME",
                key: "SHARED_ACCESS_POLICY_KEY",
                displayName: deviceInfo.FriendlyName,
                organization: "YOUR_ORGANIZATION_OR_SELF",
                location: "YOUR_LOCATION",
                sensorList: sensors);

            // Initialize FEZ HAT shield
            SetupHat();
            
        }
コード例 #2
0
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List <ConnectTheDotsSensor> sensors = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor(0, "Kg", 0, "Celsius")
            };

            ctdHelper = new ConnectTheDotsHelper(iotDeviceConnectionString: "<enter your connection string here>",
                                                 sensorList: sensors);
        }
コード例 #3
0
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List <ConnectTheDotsSensor> sensors = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ab", "Temperature", "C"),
            };

            ctdHelper = new ConnectTheDotsHelper(iotDeviceConnectionString: "IOT_CONNECTION_STRING",
                                                 organization: "YOUR_ORGANIZATION_OR_SELF",
                                                 location: "YOUR_LOCATION",
                                                 sensorList: sensors);

            Button_Click(null, null);
        }
コード例 #4
0
ファイル: MainPage.xaml.cs プロジェクト: oliviak/IoT-Camp
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List<ConnectTheDotsSensor> sensors = new List<ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ab", "Temperature", "C"),
            };

            ctdHelper = new ConnectTheDotsHelper(iotDeviceConnectionString: "IOT_CONNECTION_STRING",
                organization: "YOUR_ORGANIZATION_OR_SELF",
                location: "YOUR_LOCATION",
                sensorList: sensors);

            Button_Click(null, null);
        }
コード例 #5
0
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List<ConnectTheDotsSensor> sensors = new List<ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ab", "Light", "L"),
                new ConnectTheDotsSensor("d93ffbab-7dff-440d-a9f0-5aa091630201", "Temperature", "C"),
            };
            
            ctdHelper = new ConnectTheDotsHelper(iotDeviceConnectionString: "IOT_CONNECTION_STRING",
                organization: "YOUR_ORGANIZATION_OR_SELF",
                location: "YOUR_LOCATION",
                sensorList: sensors);
        }
コード例 #6
0
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List <ConnectTheDotsSensor> sensors = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ab", "Light", "L"),
                new ConnectTheDotsSensor("d93ffbab-7dff-440d-a9f0-5aa091630201", "Temperature", "C"),
            };

            ctdHelper = new ConnectTheDotsHelper(iotDeviceConnectionString: "IOT_CONNECTION_STRING",
                                                 organization: "YOUR_ORGANIZATION_OR_SELF",
                                                 location: "YOUR_LOCATION",
                                                 sensorList: sensors);
        }
コード例 #7
0
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List <ConnectTheDotsSensor> sensors = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("SensorL01", "Light", "L"),
                new ConnectTheDotsSensor("SensorT01", "Temperature", "C")
            };

            //##EDIT
            ctdHelper = new ConnectTheDotsHelper(iotDeviceConnectionString: "<<< Add your IoT hub connection string here >>>", //IoT Hub connection string
                                                 organization: "PurpleFrogSystems",
                                                 location: "UK",
                                                 sensorList: sensors);
        }
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List <ConnectTheDotsSensor> sensors = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("SensorL01", "Light", "L"),
                new ConnectTheDotsSensor("SensorT01", "Temperature", "C")
            };

            //##EDIT
            ctdHelper = new ConnectTheDotsHelper(iotDeviceConnectionString: "HostName=BCSDemo1.azure-devices.net;DeviceId=FrogPi2;SharedAccessKey=dkcwl/vNsLY0eUZs4+DzGhCiL2SKTrvgJUfIrySQszA=",
                                                 organization: "PurpleFrogSystems",
                                                 location: "UK",
                                                 sensorList: sensors);
        }
コード例 #9
0
ファイル: MainPage.xaml.cs プロジェクト: jakobehn/DevRoadShow
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List<ConnectTheDotsSensor> sensors = new List<ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ab", "Temperature", "F"),
            };

            ctdHelper = new ConnectTheDotsHelper(serviceBusNamespace: "SERVICE_BUS_NAMESPACE",
                eventHubName: "EVENT_HUB_NAME",
                keyName: "SHARED_ACCESS_POLICY_NAME",
                key: "SHARED_ACCESS_POLICY_KEY",
                displayName: "YOUR_DEVICE_NAME",
                organization: "YOUR_ORGANIZATION_OR_SELF",
                location: "YOUR_LOCATION",
                sensorList: sensors);

            Button_Click(null, null);
        }
コード例 #10
0
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List <ConnectTheDotsSensor> sensors = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ab", "Temperature", "F"),
            };

            ctdHelper = new ConnectTheDotsHelper(serviceBusNamespace: "SERVICE_BUS_NAMESPACE",
                                                 eventHubName: "EVENT_HUB_NAME",
                                                 keyName: "SHARED_ACCESS_POLICY_NAME",
                                                 key: "SHARED_ACCESS_POLICY_KEY",
                                                 displayName: "YOUR_DEVICE_NAME",
                                                 organization: "YOUR_ORGANIZATION_OR_SELF",
                                                 location: "YOUR_LOCATION",
                                                 sensorList: sensors);

            Button_Click(null, null);
        }
コード例 #11
0
        /// <summary>
        /// Main page constructor
        /// </summary>
        public MainPage()
        {
            this.InitializeComponent();

            var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            // Hard coding guid for sensors. Not an issue for this particular application which is meant for testing and demos
            List <ConnectTheDotsSensor> sensors = new List <ConnectTheDotsSensor> {
                new ConnectTheDotsSensor("2298a348-e2f9-4438-ab23-82a3930662ab", "Light", "L"),
                new ConnectTheDotsSensor("d93ffbab-7dff-440d-a9f0-5aa091630201", "Temperature", "C"),
            };

            ctdHelper = new ConnectTheDotsHelper(serviceBusNamespace: "SERVICE_BUS_NAMESPACE",
                                                 eventHubName: "EVENT_HUB_NAME",
                                                 keyName: "SHARED_ACCESS_POLICY_NAME",
                                                 key: "SHARED_ACCESS_POLICY_KEY",
                                                 displayName: deviceInfo.FriendlyName,
                                                 organization: "YOUR_ORGANIZATION_OR_SELF",
                                                 location: "YOUR_LOCATION",
                                                 sensorList: sensors);

            // Initialize FEZ HAT shield
            SetupHat();
        }