const int LED = 2;
const int SWITCH = 12;
unsigned char state_led = 0;
unsigned int count_on = 0;
unsigned int count_off = 0;
void setup() {
// put your setup code here, to run once:
pinMode(LED, OUTPUT);
pinMode(SWITCH,INPUT_PULLUP);
}
void loop() {
if(state_led==0){
if(count_off < 200){
digitalWrite(LED, LOW);
delay(1);
count_off++;
}else{
state_led = 1;
count_off = 0;
}
}else if (state_led==1){
if(count_on < 10000){
digitalWrite(LED, HIGH);
delay(1);
count_on++;
}else{
state_led = 0;
count_on = 0;
}
}
}