i got the count part working now
unsigned long OFF_TIME=1000;
unsigned long ON_TIME=100;
const int ledPin = 53;
int ledState = LOW;
long previousMillis = 0;
int Count=0;
unsigned long interval;
void setup()
{
pinMode(ledPin, OUTPUT);
}
void loop()
{
if (Count<=10)
{
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa:
if (ledState == LOW) {
ledState = HIGH;
interval = ON_TIME;
Count++;
}
else
{
ledState = LOW;
interval = OFF_TIME;
}
digitalWrite(ledPin,ledState);
}
}
else
{
digitalWrite(ledPin,LOW);
}
}
now would be a great time to start varying the off time