int ledPin = 2;
int delayPeriod = 1000;
int count = 0;
void setup() {
// put your setup code here, to run once:
pinMode (ledPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite (ledPin, HIGH);
delay(delayPeriod);
digitalWrite(ledPin, LOW);
delay(delayPeriod);
count ++;
if(count == 3)
{
count = 0;
while(1) {}
}
}