PRP 02 Pushbutton Quiz

PRP 02 Pushbutton Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

Arduino - P2uur - deel 2

Arduino - P2uur - deel 2

6th - 12th Grade

12 Qs

UNOARDUINO

UNOARDUINO

12th Grade

10 Qs

UJi Pemahaman Wokwi dan perintah sederhana pemrograman arduino

UJi Pemahaman Wokwi dan perintah sederhana pemrograman arduino

12th Grade

10 Qs

Wacky Wednesday Review #3

Wacky Wednesday Review #3

9th - 12th Grade

15 Qs

Arduino Level 2

Arduino Level 2

12th Grade

15 Qs

Microbit 3

Microbit 3

6th Grade - University

10 Qs

3 Arduino: IF and IF-ELSE

3 Arduino: IF and IF-ELSE

9th - 12th Grade

15 Qs

Unit 6 Microcontrollers Intro 2022

Unit 6 Microcontrollers Intro 2022

11th Grade - University

14 Qs

PRP 02 Pushbutton Quiz

PRP 02 Pushbutton Quiz

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Alex Song

Used 4+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the `pinMode` function in the Arduino code?

To read the state of a pin

To set a pin as either an input or output

To write a value to a pin

To initialise the Arduino board

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the given code, what is the role of the `digitalRead` function?

To turn the LED on or off

To set the pin mode

To read the state of a digital pin

To initialise the LED pin

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen when the pushbutton is pressed according to the code?

The LED will turn off

The LED will blink

The LED will turn on

The LED will change colour

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which pin is configured as an output in the code?

Pin 7

Pin 12

Pin 0

Pin 1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the initial value of `buttonState` in the code?

1

0

HIGH

LOW

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of variable is `buttonState` in the code?

String

Float

Integer

Boolean

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `digitalWrite` function do in the code?

It reads the value from a pin

It sets a pin to HIGH or LOW

It configures the pin mode

It initialises the Arduino board

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?