logo

Crowdly

Browser

Add to Chrome

Яка мета програми, наведеної нижче? int ledState = LOW; int ledPin = 13; ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Яка мета програми, наведеної нижче?

int ledState = LOW;

int ledPin = 13;

unsigned long previousMillis = 0;

const long interval = 1000;          

void setup() {

    pinMode(ledPin, OUTPUT);

}

void loop() {

    unsigned long currentMillis = millis();

    if (currentMillis - previousMillis >= interval) {

        previousMillis = currentMillis;

        if (ledState == LOW) {

            ledState = HIGH;

        } else {

            ledState = LOW;

        }

        digitalWrite(ledPin, ledState);

    }

}

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on vns.lpnu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome