2016-09-18 24 views
0

小さなプログラムを使用してすべての設定が正しく行われていることを確認しようとしています。しかし、「GPIO」を参照しているすべてのエラー(コメントを参照)が発生しています また、「Windows IoT Extensions for UWP」も既に参照しています。 - ご協力いただきありがとうございます。あなたは、開発環境の問題を持っているようWindows IoT Raspberry Pi GPIO with VB.net

Imports Windows.Devices.Gpio 'Imports statement is unnecessary 

Public NotInheritable Class MainPage 
Inherits Page 
Private gpio 
Private pin As GpioPin 'ERROR: GpioPin is not defined 
Private Const LED_PIN = 18 

Private Sub button_Click(sender As Object, e As RoutedEventArgs) Handles button.Click 
    Call TurnLedOnOff() 
End Sub 

Private Sub TurnLedOnOff() 

     'Check if gpio was already initialied 
     If gpio Is Nothing Then 
      gpio = GpioController.GetDefault 'ERROR: GpioController is not declared 
     End If 

     'Check if LED's pin was already initialied 
     If pin Is Nothing Then 
      pin = gpio.OpenPin(LED_PIN) 
      pin.Write(GpioPinValue.Low) 'ERROR: Not Declared 
      pin.SetDriveMode(GpioPinDriveMode.Output) 'ERROR: Not Declared 
     End If 

     'Read pin status and invert state 
     If pin.Read = GpioPinValue.High Then 'ERROR: Not Declared 
      pin.Write(GpioPinValue.Low) 'ERROR: Not Declared 
     Else 
      pin.Write(GpioPinValue.High) 'ERROR: Not Declared 
     End If 
    End Sub 
End Class 
+0

を試みるが見えます。 Windows SDK 10586がインストールされていますか? – Jackie

答えて

-1

If gpio Is Nothing Then 
    gpio = GpioController.GetDefault.openpin(LED_PIN) 
end if 
関連する問題