Using an Uno to play back somewhat large table of analog inputs, best way?

mrburnette:
Your statement that I bolded above is not helpful., IMO.

Apparently not. I thought it hinted at a solution to the OP's stated problem. Since it didn't seem to work, I'll be explicit this time.

Addressing the OP's directly stated concerns,

jcaserta:
Now I just need to figure out how to convert a CSV into an array and store it in program memory...

jcaserta:
... it's 1200 rows long so there's no way I'm converting from CSV to the second format manually ...

In view of the resources that he seems to have in hand,

jcaserta:
... I'm trying to get the data from Excel onto the Arduino ...

Here's how I'd put that data into a PROGMEM array:

  • Open the CSV file in a text editor, and copy it to the clipboard.
  • Open a spreadsheet, and paste. The reason I wouldn't open the CSV in a spreadsheet directly is to keep the spreadsheet from trying to parse the data. If you have a way of keeping it from doing that, you can open the CSV straight from the spreadsheet program.
  • Write a spreadsheet formula to append a curly open bracket, a curly closed bracket, and a comma to single line, and paste it where I need it. In Excel or in LibreOffice that formula might be, untested:
    ="{ "&A1&" },"
  • Copy the results of that formula from the spreadsheet, and paste it into the IDE.

I do this fairly often, for the same reason that it seems the OP wants to: to use handily captured or calculated data as known input to a program under development. My memory tells me that the compiler doesn't even complain if you leave the last unnecessary comma in the code. If you're a purist, you may want to take it out.

You might want to take the intermediate step of pasting the data from the spreadsheet into a text editor, copying it again, and pasting from that into the IDE. I've seen the IDE balk at big clipboards from Excel, but not from Notepad or Gedit, and those programs handle pastes from spreadsheets with aplomb.

Of course, all that presumes that you can readily get data out of a 2D PROGMEM array. I've never tried it. This post says it has a solution; maybe it works - Multi-dimensional array in PROGMEM (Arduino Noob) - Syntax & Programs - Arduino Forum. Alternatively, you could use a one-dimensional array, and index it with something like 4*i + j, where i is the row index, and j the column, zero-based. If you go that route, you don't need brackets around each line, you only need to add a comma at the end of each.

I note that the sample data shows five entries per line, rather than four, and that the sample code applies that information inconsistently. Maybe that data is for illustration, and not the real thing. If the CSV has line numbers, you'll want to account for it somehow, either by allowing space for it in the array, or stripping it out of the data. The array already takes up nearly a third of the available flash memory; I'd recommend removing line numbers. Here's a way to strip the first entry off a line of comma-separated values in Excel or Libre, untested:=MID(A1,FIND(",",A1)+1,LEN(A1))OpenOffice might do it that way, too; I don't remember.

As I see it, that solves the problem, as it was directly stated: it make the data available to the program, it doesn't require the OP to manually change oodles of lines of code, and it uses the tools he says he already has.