B4R Question Compile binary data

Melghost

Member
Licensed User
Longtime User
Hi.

Is it possible to include a binary file, to read its data like if it was a table? So when I compile the source code, all the binary file is saved to the Arduino memory together with the executable code.

Thank you.
 

hatzisn

Expert
Licensed User
Longtime User
You can load the contents of the binary file to a byte array defined in your program as long as there is enough memory to do so. Then you can manipulate the binary array.
 
Upvote 0

Melghost

Member
Licensed User
Longtime User
Well, in fact I'm trying to attach a large binary file... It may be 1Mb or so. I actually could convert it to text with the source code format, and attach this text to the source code but... I would be very surprised if there isn't a more elegant way to do this... Like an "import" or "include" keyword for binary files for example.
 
Upvote 0
Top