Thanks PaulS for your response. Let me try and address your comments to help clarify things for you.
Ideally I would like to have the flexibility to have the sketch read values from a file
This is possible, if the file is on an SD card, and you have an SD shield.
It seems to me to be real messy coding (not to mention not very user friendly) if I have to code in each variable in setup() as I am currently. Imagine having to type all the following a few hundred times:
Task.Step.xPos = 5;
Task.Step.yPos = 90;
Task.Step.TimeToComplete = 1000;
I am thinking if I define the three fields in a spreadsheet and save them as text it would be a slicker method. If saving a dat or txt file on arduio is not possible I imagine I could just declare it as a string. Something like this:
//data format: <qty of steps in task>,<x>,<y>,<TimeToCompleteStep>,<x>,<y>,<TimeToCompleteStep>,…etc…
string DataString = “7,14,32,11000,170,155,7000,…etc…
not sure if string has a size limit… if it does I’m back to the drawing board.
defining tasks on a spreadsheet would be so much nicer
Than what? Being poked by sharp objects?
Lol, not sure what to say… think I delt with it above ;^)
and create the correct number of tasks that consist of a varying number of steps.
How? What would the data in the file look like? How would the "correct number of tasks" be determined? How would the "varying number of steps" (per task?) be determined? Would the number of steps really be varying, or would the number of steps to get a task done be what varies?
At the moment I have an array of an array of records. Let me show you my defining it:
int xPos; //define ending x position
int yPos; //define ending y position
unsigned long TimeToComplete; //define length of time to reach ending position (sets speed of servo)
It would be very nice if there was some way to make these arrays dynamic (created during runtime)
I don't do google docs, and I see no particular reason to look at your code, since you didn't ask any questions about it.
And now you don’t have to… :-D
Thanks again for taking the time to look and respond so quickly.