B4R Question B4RSerializator with Arduino Nano

Discussion in 'B4R Questions' started by Blueforcer, Nov 21, 2018.

  1. Blueforcer

    Blueforcer Active Member Licensed 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!


    Code:
    #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(10As 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
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    Have you edited rCore.h and removed the new operator declaration (line 18)?
     
  3. Blueforcer

    Blueforcer Active Member Licensed User

  4. Erel

    Erel Administrator Staff Member Licensed User

    This workaround should be avoided.

    Add this line if you encounter the duplicate 'new' declaration issue:
    Code:
    #DefineExtra: #define SKIP_B4RNEW
     
    tigrot, BillMeyer and Blueforcer like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice