title: How to write an array of non primitive objects to Arduino EEPROM then read the array into memory each time the program starts
body: <p>I am developing a pill reminder for Electronics Final year project. I need to store the name of the pill, the number of times it is taken, the hours it is taken during and whether it is currently active or not. I created a class pill as below, and stored the pills in an array:</p>
  
  <pre><code>class Pill{
      public:
          String pillName = "Nothing";
          boolean pillTaken = true;
          int hours[6]; 
          boolean active = false;
          int count = 0; 
  };
  
  Pill pills[6];
  </code></pre>
  
  <p>Now I want to persist this data in the Arduino EEPROM, how can I write the array of pills to the EEPROM and read the data into memory each time program starts. Also, I need to update the array each time a command to modify a pill is received, putting the new values. </p>