//sort through kinematics for one cyclewhile(time_position<8){RIB_1_Fin_Left(Rib_1_Left[time_position]);RIB_2_Fin_Left(Rib_2_Left[time_position]);RIB_4_Fin_Left(Rib_4_Left[time_position]);RIB_5_Fin_Left(Rib_5_Left[time_position]);BULK_Fin_Left(Bulk_Left[time_position]);time_position++;}}

the above code properly compiles with no problem . . . however, when I remove the commenting out for the IF statement, the code no longer works:

//sort through kinematics for one cyclewhile(time_position<8){RIB_1_Fin_Left(Rib_1_Left[time_position]);RIB_2_Fin_Left(Rib_2_Left[time_position]);RIB_4_Fin_Left(Rib_4_Left[time_position]);RIB_5_Fin_Left(Rib_5_Left[time_position]);BULK_Fin_Left(Bulk_Left[time_position]);time_position++;}}

when compiling that code, i get these errors that make no sense to me:(see attached image)

The {1,2,3} syntax can only be used during the initialization of the variable, on the declaration line.

What you really need to do is to have an array in memory with each setup, and copy the contents of the template arrays into your working arrays. Of course, given the numbers you're giving me, you're probably going to run out of RAM really quick, unless you're using one of the huge AVR chips.

If that is the case (low RAM), you can store the arrays in FLASH, and then copy them into to the RAM array from there.

Looking at the links you sent me, I notice they use PGM_P but Im not . . .

Quote

How many of these 8-byte arrays do you have in total (including all sets of values)?

I am basically storing in pre-programmed motions for my robot. I ideally would need at least 10 arrays, each of size 8. Perferably 3x as many, but Im flexible . . . Any suggestions on reducing the required memory cost?

Well, if you only need 10 arrays of 8 bytes each, that's only 80 bytes. 3x that is still only 240 bytes. Just put them in RAM and don't worry about it. You've got 4096 bytes, although you'll be using some of that for stack and other variables.

so ummmm, that brings me back to my first question . . . how do I change the contents of the array?sorry for being a pain! im a mechanical engineer

Quote

so lets say i initialize an array like this:unsigned int Rib_1_Left[8]={33,33,33,33,33,33,33,33};

but then later i want the array to have some other random set of numbers stored:unsigned int Rib_1_Left[8]={133,23,33,43,23,83,93,133};

without reinitiating it, how would i write that above line?

if I just do:Rib_1_Left[8]={133,23,33,43,23,83,93,133};it gives me an error that says "expected expression before '{' token"

i could of course do one liners like this that will work:Rib_1_Left[0]=133;Rib_1_Left[1]=23;Rib_1_Left[2]=33;but since i must have 16 arrays each of size 8 this would get extremely messy very fast

the only other thought i have is that i can do a while loop that does an i++ and individually transfers bytes one by one to the array . . . but thats too processor intensive and too much code i think for something that should be simple . . .