Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public Serial3 As Serial
Public Serial1 As Serial
Dim Command As String="AT+CMGL=""ALL"""
End Sub
Private Sub AppStart
Dim Answer As String
Log("AppStart")
Serial3.Initialize(19200)
Serial1.Initialize(9600)
Log(Command)
Serial1.Stream.WriteBytes("aaa",0,3)
Serial3.Stream.WriteBytes(Command.GetBytes(),0,Command.Length)
Serial3.Stream.WriteBytes(CRLF,0,2)
Serial3.Stream.ReadBytes(Answer,0,128)
Log(Answer)
Serial3.Close()
End Sub