//---------------------------------------------------------------
//---  Blinks an LED  in increasing numbers of blinks.
//     It counts up to 10 and then resets to 1.
//
//  Setup: Wire an LED from Digital Pin 7 thru a 330 ohm resistor to ground 
//---------------------------------------------------------------

int ledPin = 7;
int count = 0;
  
void setup() {              // Only do once at startup           
  pinMode(ledPin, OUTPUT);  // initialize digital pin as output (for LED.)
}

void loop()  {             
  count = blinkAdder(count);  
//--- This is a conditional; test
  if(count > 10) {
    count = 0;
  } //--- End of condition test
//--- This is a "for loop" ----
  for(int i = 0; i < count; i++){
     digitalWrite(ledPin, HIGH);
     delay(100);
     digitalWrite(ledPin, LOW);
     delay(100);
  } //----End of "for loop" ---
  delay(800);               
}

int blinkAdder(int num){
        num = num + 1;
        return num;
}
