So, I'd like to preface this by saying I was woefully underprepared for this, so if I sound inexperienced or stupid, it's because I am both these things.
With that being said, I'm working on a College Senior Project, a module to modify a lawnmower to be able to mime a route that it's been taken on. I selected an ATxmega256A3BU to serve as the brain of this project, and nearly everything is working, except for one big component.
The intent is for the mower to be taught the route by physically taking it on the route the user wishes for it to learn. The system, using five Reed switches per side, records how many times the drive wheels on the treads mounted to the mower spin, what direction they're turning, and what the "sequence" is. This is supplemented by data from an MPU-6050 Gyroscope module, which takes note of the mower's orientation at every "tick" from the Reed Switches. When the system is set to follow the recorded route, it mimics the movement of the wheels, while also using the Gyroscope data to correct itself should it turn off track. I have all of the components communicating, and I only have one issue remaining before the code is complete and I can finally sleep at night. I'm not sure how to go about storing the data gathered by the system, or if it's even possible to do what I'm wanting it to do. The idea was that every so many "ticks" from the Reed switches would cause the information to be stored in memory, in an arrangement that's something like this.
(Tick number, Left wheel forward rotations, left wheel backwards rotations, right wheel forward rotations, right wheel backwards rotations, Gyroscope data)
When the mower is following the route, it checks it's current readings against those in memory at every tick, and corrects itself if it's gone off course. The problem is that I'm not sure on how to go about getting the values into memory. I've been going through as much information as I can find, and I'm not sure if EEPROM or Flash Memory should be used, if I need an external memory device, what format I should store the data in, how many ticks of the Reed Switch should occur before it stores the data, or if any of this is even remotely possible.
I'm using Microchip Studio to program this, which I'm also very new to. I have read all the datasheets I could find, but I've been learning all of this material at a fairly breakneck pace, so the chances of me having missed something are decent. All of the actual physical design choices are, unfortunately, set in stone, so I cannot use a GPS module, rotary encoder, or anything else to replace an existing component I've mentioned. Any insight on to what I should do to get this all working would be deeply appreciated.