#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
Sub Process_Globals
Public Serial1 As Serial
Private Timer1 As Timer
Private dp As D1Pins
Dim buttonPin As Pin
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
buttonPin.Initialize(dp.D0, buttonPin.MODE_INPUT_PULLUP) ' --> this for GPIO_0
Timer1.Initialize("Timer1_Tick", 1000) '1000ms = 1 second
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick
Log("Timer1_Tick")
Log ("buttonPin=" , buttonPin.DigitalRead)
End Sub