'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
Sub Process_Globals
Private pi4j As Pi4J
Private PinIn As DigitalInput
End Sub
Sub AppStart (Args() As String)
Log("Hello world!!!")
Start
StartMessageLoop
End Sub
Private Sub Start
pi4j.Initialize("pi4j")
PinIn.Initialize(pi4j, "PinIn", 2, "PULL_DOWN", 3000)
End Sub
Private Sub PinIn_StateChange (State As Boolean)
Log("New state: " & State)
End Sub