I'm getting a compile error ....
B4J version: 4.00
Parsing code. (0.00s)
Compiling code. (0.01s)
Compiling layouts code. (0.00s)
Compiling generated Java code. Error
B4J line: 18
Private PinXo As GpioPinDigitalOutput = PinXi.Cha
javac 1.8.0_51
src\b4j\example\main.java:74: error: cannot find symbol
_pinxo = _pinxi.ChangeToOutput();
^
symbol: method ChangeToOutput()
location: variable _pinxi of type GpioPinDigitalInputWrapper
1 error
with the code being ...
'Non-UI application (console application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: true
#End Region
Sub Process_Globals
Dim controller As GpioController
Dim PinXi As GpioPinDigitalInput
Dim Reading As Int
Dim Timer1 As Timer
End Sub
Sub AppStart (Args() As String)
Reading = 0
controller.Initialize
PinXi.Initialize("PinXi", 27) ' Init the Input Pin
Private PinXo As GpioPinDigitalOutput = PinXi.ChangeToOutput
PinXo.Initialize(27, False) ' Set the Pin for Output and LOW in order to reset the capacitor
PinXi = PinXo.ChangeToInput ' Set the Pin for Input in order to read when its' State changes to HIGH
Timer1.Initialize("Timer1",10) ' Check the value every 10 milliseconds
StartMessageLoop
End Sub
Sub PinXi_StateChange(State As Boolean)
If State = True Then
Timer1.Enabled = False
Log("Reading: " & Reading)
Reading = 0
Private PinXo As GpioPinDigitalOutput = PinXi.ChangeToOutput
PinXo.Initialize(27, False) ' Set the Pin for Output and LOW in order to reset the capacitor
PinXi = PinXo.ChangeToInput ' Set the Pin for Input in order to read when its' State changes to HIGH
Timer1.Enabled = True
End If
Log("PinXi StateChange event: " & State)
End Sub
Sub Timer1_Tick
Reading = Reading + 1
End Sub