did a lot of looking around and I couldn't find any solution.
Thanks guys!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Media.Devices;
using Windows.Media.Capture;
namespace LEDBlinkerConsole
{
class Torch
{
public async static void BlinkLED()
{
MediaCapture mc = new MediaCapture();
await mc.InitializeAsync();
Console.WriteLine("Please type \"flash\" to flash the LED\n");
string consInput = Console.ReadLine();
if (consInput.ToUpper() == "FLASH")
{
if (mc.VideoDeviceController.TorchControl.Supported == true)
{
mc.VideoDeviceController.TorchControl.Enabled = true;
mc.VideoDeviceController.TorchControl.PowerPercent = 100;
}
}
}
}
}
I figured it out. I referenced "System.Runtime" and I had to reference "System.Runtime.Windowsruntime". I had to delete the reference to "System.Runtime" in order for it to work. More info here about the Async calls from a non-metro app: http://www.wintellect.com/blogs/jeffreyr/using-the-windows-runtime-from-a-non-metro-application