I would like to record and use information on the Cortex. This would be anywhere between 3 or 4 sets of data all the way up to several hundred. The purpose of this would be to store vector and orientation records, so the robot knows where it is in the field. It would also need to access and use all of this information.
I am still very new to programming and do not yet know all the terms and basic ways of doing things. I have no clue how to do this and am excitedly awaiting your responses! Thanks in advance for the help!
One thing you can do is have all the data values print to the debug stream of RobotC, and then you can copy and paste those values into your code. I don’t know how to store the values automatically. I think Mr. Pearman would be a better source on this.
What I am asking is: is there a way to store information that can be accessed by the program? For instance, could it see sensor values or motor power at different times depending on what happens, and then access those ON ITS OWN later during the same autonomous period or programming skills run?
You might look at using arrays in RobotC. I think you can store data in arrays so long as you don’t turn off the Cortex. But if you cycle power, etc. you would lose that data, so it’s only good for a single, uninterrupted powered period of time.
I’m away from my usual link files, but if you google RobotC arrays and so forth, that might get you started.
Is it your intention to store this vector information between power cycles? In other words, are you recording the data, then using that data without ever turning off the Cortex? Or is it your intention to store the same data over a span of days or weeks, despite the fact you will be turning your Cortex on and off throughout all that time???
That was an old “rerun” program written in ROBOTC V2.xx before we had pointers available as far as I remember.
Saving information on the cortex between power cycles is possible using the same memory as the program is stored in, however, there are several issues to be considered when doing this. I released code to access the ROBOTC file system last year.