title: Unable to blink led 3 times in Arduino program
body: <p>I want to run the loop for three times to blink the led 3 times in Arduino program. How to run the loop for 3 times and exit from the loop.how to use return statement in loop? once led is getting on  for 1 sec and then getting off.</p>
  
  <pre><code>int LedPin = 13;
  int Loops = 1;
  void setup() {
  
    pinMode(LedPin, OUTPUT);
  }
  
  void loop() {
  digitalWrite(13, LOW);
  Loops = Loops + 1;
    if    ( Loops &lt; 3 )
  
    {
        digitalWrite(13, HIGH);
        delay(2000);  
      }
  
   else  {
    digitalWrite(13, LOW);      
    exit(0);  
    }
  }
  </code></pre>