Skip to main content

How to save a hex file into Arduino Flash to send it via Serial?

I have a text file with hex values formatted in the following style:

A0 3F 55 01 00 C7 55 01 00 C7 AA 29 71 11 00 0B
00 C7 AA 29 71 1F AA 29 71 11 55 01 A0 3F 55 DC
...

How can I save this data into my Arduino's Flash (to save RAM)? What libraries are needed? Is there any tool that can automatically create code for this purpose?

After I save this data into the Arduino's Flash, I want to send the data via Serial.

A solution without saving it into the Flash would be also OK.

I am using an Arduino Due.

William Roy
  • 515
  • 4
  • 10
  • 22