Hy
Does somebody of you know if it is suitable to write for Windows IOT with Visual Basic?
In the examples I anytime only see C++ and C#.
Thanks for answers.
Hi,rausch88 wrote:Ok
I think ist the better language.
Did you tried to comunicate with the GPIO Pins?
Code: Select all
Imports Windows.Devices.Gpio
Public NotInheritable Class MainPage
Inherits Page
Private gpio
Private pin As GpioPin
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
End If
'Check if LED's pin was already initialied
If pin Is Nothing Then
pin = gpio.OpenPin(LED_PIN)
pin.Write(GpioPinValue.Low)
pin.SetDriveMode(GpioPinDriveMode.Output)
End If
'Read pin status and invert state
If pin.Read = GpioPinValue.High Then
pin.Write(GpioPinValue.Low)
Else
pin.Write(GpioPinValue.High)
End If
End Sub
End Class
I guess C# will be (much) more popular in IoT apps development than VB.NET. I would suggest to learn the (very) basics of C# (it this is not the case) so you can understand and rewrite the posted codes in VB.NET.rausch88 wrote:Hi
Do you know if there coming some examples for this?
Code: Select all
Public Sub New()
InitializeComponent()
' Add your own code after this point.
End Sub