Question.1
What will be the status of LED? (after executing the following code)
Code
const int ledPin = 8;
unsigned long previousMillis = 0;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
if (millis() - previousMillis >= 1000) {
previousMillis = millis();
digitalWrite(ledPin, !digitalRead(ledPin));
}
}