int pin = 15;
unsigned long cron = 0;
bool estado = false;
void setup() {
pinMode(pin, OUTPUT);
}
void loop() {
if (millis() - cron >= 1000) {
cron = millis();
estado = !estado;
digitalWrite(pin, estado ? HIGH : LOW);
}
}
int pin = 15;
unsigned long cron = 0;
bool estado = false;
void setup() {
pinMode(pin, OUTPUT);
}
void loop() {
if (millis() - cron >= 1000) {
cron = millis();
estado = !estado;
digitalWrite(pin, estado ? HIGH : LOW);
}
}