Search Header Logo

Programming Concepts in Arduino

Authored by jesmar santillan

Computers

8th Grade

Used 1+ times

Programming Concepts in Arduino
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function is used to configure a pin as an input or output in Arduino?

digitalRead()

pinMode()

digitalWrite()

analogRead()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the code digitalRead(2), what does the number 2 represent?

The button state

The LED pin

The pin number connected to the button

The value to write to the pin

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a pull-down resistor in a button circuit?

To increase the brightness of the LED

To keep the button pin in a known state when not pressed

To prevent the button from bouncing

To reduce the current flowing through the LED

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to turn an LED on or off in Arduino?

pinMode()

digitalWrite()

delay()

digitalRead()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a button is pressed, what value is read using digitalRead()?

0

1

LOW

HIGH

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the code snippet below, what is the purpose of the if statement?

if (buttonState == HIGH) {

digitalWrite(ledPin, HIGH);

}

To configure the LED pin as an output

To read the button state

To turn on the LED when the button is pressed

To toggle the state of the button

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if a delay is added inside the loop function?

It will increase the brightness of the LED.

It will prevent the button from working.

It will slow down the execution of the loop.

It will turn off the LED automatically.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?