title: Loop with different iterations
body: <p>I'm new to programming. I need a some help.  I have 5 sensors in my data logger. I'm planning to write sensor data to serial flash memory. I'm planning to write each sensor with different sampling rate. For example: pressure = 1Hz, Temp = 2 Hz, humidity = 2Hz, Light = 5Hz and3-axis with 100Hz. 
  Hence my loop gonna have different iterations.
  How to make a loop which can vary every time? I wrote a function to read each sensor writing frequencies. </p>
  
  <p>like below</p>
  
  <pre><code> char getpressurefreq();
   char getluxfreq();
   char gettempfreq();
   char gethumidityfreq();
   uint16_t getACCfreq();`
  </code></pre>
  
  <p>I kept them in main function. 
  Now I have frequency data.
  Now I have to make loop according to the above frequencies. </p>
  
  <p>How can I write loop for above inputs? Kindly suggest some solution. thank you all.</p>