B4R Question B4RSerializator with Arduino Nano

Blueforcer

Well-Known Member
Licensed User
Longtime User
I try to use the B4RSerializator on my Arduino Nano,
but i get the attached error wenn compiling the following code.
Compiling for an ESP works!


B4X:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 600
#End Region

Sub Process_Globals
    Public Serial1 As Serial
    Private astream As AsyncStreams
    Private ser As B4RSerializator
End Sub

Private Sub AppStart
    Serial1.Initialize(115200)
    Log("AppStart")
    astream.Initialize(Serial1.Stream, "Astream_NewData", "Astream_Error")
End Sub

Sub astream_NewData (Buffer() As Byte)
    Dim be(10) As Object 'used as a storage buffer.
    Dim objects() As Object = ser.ConvertBytesToArray(Buffer, be)
    Log("Recieved:")
    For Each o As Object In objects
        Log(o)
    Next
End Sub

Sub Astream_Error
    Log("Error.")
End Sub
 

Attachments

  • b4R log.txt
    29.8 KB · Views: 422
Top