private async void doIt(object sender, RoutedEventArgs e)
{
m_Voltage = !m_Voltage;
m_Pin27.SetDriveMode(GpioPinDriveMode.Output);
if (m_Voltage)
{
m_Pin27.Write(GpioPinValue.High);
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
m_GpioStatus.Text = "ON";
});
}
else
{
m_Pin27.Write(GpioPinValue.Low);
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
m_GpioStatus.Text = "OFF";
});
}
}
Posted
May 07 2015, 11:23 PM
by
Damir Dobric