Sparki - Memory Question

Hello everybody!

I’ve recently started working on SPARKI and was doing a little project for my university.
My idea was : sparki starts a path! He analyzes it and if theres a wall and/or an obstacle, he turn the Ultrasonic sensor and try to find a clear path. When he get’s to a area defined with black tape ( where there’s a an object he can grab) I wanted him to turn back and do the same path, but with memory of it, instead of re-analyse all the path again.
So, my question is : there is a way to save the path ( lets say, saving all the curves he does ) on a variable and make Sparki to the way back to the start with that?!
Its just because, if the object he needs to take “home” is to large, he will “blind” the Ultrasonic sensor!

Thanks in advance ( and sorry for my bad english!! )

You could save it as two arrays of moves, one for distance, another for angles, for example:
distance [] = [2, 0, 3, 0]
angle[] = [0, 90, 0, -90]

This would be as move forward two, turn 90 degrees, move forward 3, turn -90 degrees. You could record all your successful moves, and just play them in reverse to get back.