store sensor values into an array

Hi,

Thanks for the clarification on my question 1.
I'll make necessary changes.

I just learned coding just after buying the arduino board after looking at the example programs last month.
I am not so familiar to pseudo codes but I'm glad I could understand it a bit.

As for getting the max value, I really should map it in a larger range.
I used 400 because I assumed 400 should be the lowest value for my sensorVal. (lowest value for a single step)

The project I am to accomplish is a navigation aid for the blind.
The blind walks with his cane. If he encounters a "decision point", a point where he need to turn left or right, he presses either "leftsw" if he turns left or "rightsw" if he turns right. This is why I have to record the sensorVal. sensorVal is the sensor reading for every step. From my loop, the totalsensorVal is computed and will be recorded to the EEPROM when he presses leftsw or rightsw. Along with this, I also would want to record the switch being pressed. The footsw is to make sure that the blind took a step.

If the blind wants to go back to the original location, he presses returnsw. This part I will take care later. It's accessing the data I saved on the EEPROM.