#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public Serial1 As Serial
Private Timer1 As Timer
Private led As Pin
Private d1pins As D1Pins
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
led.Initialize(d1pins.D4 , led.MODE_OUTPUT)
Log("LED INIT")
Timer1.Initialize("Timer1_Tick", 1000)
Timer1.Enabled = True 'don't forget to enable it
End Sub
Private Sub Timer1_Tick
led.DigitalWrite(Not(led.DigitalRead))
End Sub