converting a csv file to code

Hi all,

Is it possible to convert a CSV file into code? I am trying to replicate a signal from another microcontroller and output the same signal from the Arduino.

Please find the link for the CSV file

Mike.

Please find attached the CSV file.

What attached file would that be ?

As to your question. No, you cannot convert a CSV file into code, but it may be possible to program the Arduino to output a file with the same contents

UKHeliBob:
What attached file would that be ?

As to your question. No, you cannot convert a CSV file into code, but it may be possible to program the Arduino to output a file with the same contents

Post edited as it wouldn't let me attach the CSV file.

With a little effort and a good editor, like Notepad++, you can convert a reasonably sized .csv file to a data array initialization statement, similar to the following:

byte output_data_array[] = {   //edited .csv file contents below
1,2,3,
4,0,2,
5,6,7
};

Use PROGMEM to put the array in program memory, otherwise it uses up precious RAM.

Thanks for your input guys.

The guys on my All About Circuits Thread decoded it.

Mike.