title: Arduino EEPROM write and read array?
body: <p>When the Arduino is powered up it has an int array stored in the flash, for example:</p>
  
  <pre><code>int secretCode[maximumKnocks] = {50, 25, 25, 50, 100, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>int secretCode[maximumKnocks] = {25, 50, 25, 50, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  </code></pre>
  
  <p>(based on <a href="http://grathio.com/assets/secret_knock_detector.pde" rel="nofollow">http://grathio.com/assets/secret_knock_detector.pde</a>)</p>
  
  <p>How would I write and read the array to/from the EEPROM? This is completely new to me, so any help would be great.</p>