Sub Process_Globals
Public Serial1 As Serial
Private SerialStream As AsyncStreams
Private Timer1 As Timer
End Sub
Private Sub AppStart
Serial1.Initialize(9600)
SerialStream.Initialize(Serial1.Stream, "SerialStream_DataReceived", "SerialStream_Error")
Timer1.Initialize("Timer1_Tick", 1000)
Timer1.Enabled = True
End Sub
Sub Timer1_Tick
SerialStream.Write(Array As Byte("Test"))
End Sub
Sub SerialStream_DataReceived (Buffer() As Byte)
Log("Received: ", Buffer)
End Sub
Sub SerialStream_Error
Log("error")
End Sub