There are two main issues that you are going to run into; grabbing multiple values for multiple arm joints (each at a different stage of movement), and storing those values for later retrieval.
For the first problem, I suggest taking a look into variable arrays. Without going into too much detail on how they work (there are a ton of tutorial guides available online that cover arrays, as they are standard in almost every programming language), you can make an array of x variables for each arm joint, where x is the number of movements you want to make:
Once the variable arrays have been created, I suggest zeroing them out manually:
Then, you will have to decide how you want to tell the code to place new values into the variable arrays, how you want to use them in your code, etc. It's a bit of an advanced concept (the 'for loop' is something that you may not have seen before; it's the equivalent of the while loop shown below with the exception that the integer 'foo' is destroyed once the loop is over) but with some practice it should start to make sense.
Now, as far as saving the values to the Cortex for use between resets; that may be a bit harder to do as there is currently no way to save a custom file to the Cortex's memory using ROBOTC. Instead, you may need to write the values to the Debug Stream and save them in as computer file, then manually copy the values into the code later on (or hardcode the values into program). If you wanted to get very fancy, you could *possibly* make a script in the language of your choice (standard C, C++, Visual Basic, etc) that pulls the values automatically from the debug stream and saves them into a file, but that may be more work than what it's worth.
Check out our Blog
! And our Facebook page
Need help? Take a look at our Wiki
and our Forums.I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody