int ledState = LOW;
int interval = 1000;
unsigned long predosli = 0;
unsigned long cas;
void setup()
{
pinMode(3, OUTPUT);
}
void loop()
{
cas = millis();
led();
}
void led()
{
if(cas - predosli >= interval)
{
predosli = cas;
if(ledState == LOW)
{
ledState = HIGH;
}
else
{
ledState = LOW;
}
digitalWrite(3, ledState);
}
}