示例#1
0
		protected override async void OnNavigatedTo(NavigationEventArgs navArgs)
		{
			ApiHelpers.MakePinWebAPICall();

			try
			{
				colorSensor = new TCS34725();
				await colorSensor.Initialize();

				Synthia = new SpeechSynthesizer();
				Synthia.Voice = SpeechSynthesizer.AllVoices[1];

				audio = new MediaElement();

				InitializeGPIO();
			}
			catch (Exception e)
			{
				Debug.WriteLine(e.Message);
			}
		}
示例#2
0
        protected override async void OnNavigatedTo(NavigationEventArgs navArgs)
        {
            ApiHelpers.MakePinWebAPICall();

            try
            {
                colorSensor = new TCS34725();
                await colorSensor.Initialize();

                Synthia       = new SpeechSynthesizer();
                Synthia.Voice = SpeechSynthesizer.AllVoices[1];

                audio = new MediaElement();

                InitializeGPIO();
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
        }