#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
Sub Process_Globals
Private sp As Serial
Private astream As AsyncStreams
Private bc As ByteConverter
End Sub
Sub AppStart (Args() As String)
sp.Initialize("")
sp.Open("/dev/ttyAMA0")
sp.SetParams(9600,8,1,0)
astream.Initialize(sp.GetInputStream,sp.GetOutputStream,"AStream")
StartMessageLoop
End Sub
Sub AStream_NewData (Buffer() As Byte)
Log("AStream_NewData : " & bc.HexFromBytes(Buffer))
End Sub
Sub AStream_Error
Log("AStream_Error")
End Sub
Sub AStream_Terminated
Log("AStream_Terminated")
End Sub