Hi to all. I am trying to use B4R instead of the native Arduino Ide, hoping that it will be more comfortable to work with. Therefore I started with a very basic example, just wanting to see the Log. I am using an Arduino Mega, correctly connected etc. I have selected the board and the Serial port (by the way B4R ide finds it automatically). Besides the use of Serial3 in the program, which I was not yet able to test, and is not the topic of this post, I don't see the messages in the Log. The Log just displays "PROGRAM START" and nothing else. This problem has already been pointed out in an old thread, but with another board., and I didn't see the solution. I don't figure out what i am missing.. Any hint?
Thanks in advance.
B4X:
#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 Serial3 As Serial
Dim Command As String="AT+CMGL=""ALL"""
End Sub
Private Sub AppStart
Dim Answer As String
Log("AppStart")
Serial3.Initialize(19200)
Log(Command)
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