1 Public Class Led_Example
2 Public Shared Sub Led()
5 Dim pVIBSystem As VIB_NET.VIBSystem = New VIB_NET.VIBSystem()
7 If pVIBSystem IsNot Nothing Then
9 'open device: Led number 0
10 Dim pLed As VIB_NET.Led = DirectCast(pVIBSystem.OpenDevice(VIB_NET.eDEVICE_TYPE.LED, 0), VIB_NET.Led)
12 Console.WriteLine("I'm a " + pLed.GetType().ToString() + ".")
14 If pLed IsNot Nothing Then
16 'Set Led 1 ON and all other OFF
20 'Set all available Leds Step by Step ON and OFF again
21 For i As UInt32 = 0 To pLed.NumberOfLEDs - 1 Step 1
23 System.Threading.Thread.Sleep(500)
27 'Set Led mode for Led 0 to ON
28 pLed.SetMode(0, VIB_NET.Led.eLED_MODE.GEN0)
30 'Set Led mode for Led 2 to OFF
31 pLed.SetMode(2, VIB_NET.Led.eLED_MODE.GEN1)
33 'signal with 300 ms on and 1500 ms off
34 pLed.ConfigureGenerator(0, 1, 300, 0, 1500)
36 'two pulses(200 ms on, 100 ms off) 500 ms break time(LED off), two pulses ...
37 pLed.ConfigureGenerator(1, 2, 200, 100, 500)
38 Catch e As System.Exception
39 Console.WriteLine(e.Message)
42 pVIBSystem.CloseDevice(pLed)
46 Catch e As System.Exception
47 Console.WriteLine(e.Message)
53 Console.WriteLine(vbNewLine + "Press enter to proceed...")
54 System.Console.ReadLine()