Sub Process_Globals
Public Serial1 As Serial
Private ID(8) As Byte
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
RunNative("getid", Null)
Dim bc As ByteConverter 'rRandomAccessFile library
Log(bc.HexFromBytes(ID))
End Sub
#if C
#include <ArduinoUniqueID.h>
void getid (B4R::Object* o) {
for(size_t i = 0; i < 8; i++)
((Byte*)b4r_main::_id->data)[i] = UniqueID8[i];
}
#End If
Sub Process_Globals
Public Serial1 As Serial
Private ID(8) As Byte
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
RunNative("getid", Null)
Dim bc As ByteConverter 'rRandomAccessFile library
Log(bc.HexFromBytes(ID))
End Sub
#if C
#include <ArduinoUniqueID.h>
void getid (B4R::Object* o) {
for(size_t i = 0; i < 8; i++)
((Byte*)b4r_main::_id->data)[i] = UniqueID8[i];
}
#End If
You don't need the XML file. Simply install the library from Arduino IDE -> libraries manager.
You also don't need to add it in B4R. It is referenced from the native code.