Sub Process_Globals
Public Serial1 As Serial
Private astream As AsyncStreams
Private timer1 As Timer
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
astream.Initialize(Serial1.Stream, "astream_NewData", "astream_Error")
timer1.Initialize("timer1_Tick", 3000)
timer1.Enabled = True
End Sub
Sub Timer1_Tick
Dim ar(3000) As Byte
For i=0 To 1000
ar(i)=1
Next
astream.Write2(ar,1,10)
Log("AStream Bytes written")
End Sub
Sub AStream_NewData (Buffer() As Byte)
Log("AStream Received:", Buffer)
End Sub
Sub AStream_Error
Log("AStream Error")
End Sub