When the Arduino is powered up it has an int array stored in the flash, for example:
int secretCode[maximumKnocks] = {50, 25, 25, 50, 100, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
When the program button is pressed, it then waits for the piezo to pick up a knock and this array then changes to, for example:
int secretCode[maximumKnocks] = {25, 50, 25, 50, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
(based on http://grathio.com/assets/secret_knock_detector.pde)
How would I write and read the array to/from the EEPROM? This is completely new to me, so any help would be great.