Imports Tinkerforge

Module Module1

    Sub Main()
        Dim ipcon = New IPConnection
        Dim io = New BrickletIO4("h2R", ipcon) ' Create device object
        ipcon.Connect("localhost", 4223) ' Connect to brickd

        'Old Style
        Dim value As Byte
        Dim time As Long
        Dim timeRemaining As Long
        io.GetMonoflop(0, value:=value, time:=time, timeRemaining:=timeRemaining)
        Console.WriteLine(("Remaining time: " + timeRemaining.ToString()))

        'New Style            
        Console.WriteLine(("Remaining time: " + io.GetMonoflop(0).TimeRemaining.ToString()))


        ipcon.Disconnect()
        Console.WriteLine("Press enter to exit...")
        Console.ReadKey()
    End Sub

End Module
