What is the basic code to make an LED blink on Arduino?

Arduino Basics for Beginners

Quiz
•
Other
•
7th Grade
•
Hard
labict undefined
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
void setup() { pinMode(LED_BUILTIN, OUTPUT); } void loop() { digitalWrite(LED_BUILTIN, HIGH); }
void setup() { pinMode(LED_BUILTIN, OUTPUT); } void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(1000); digitalWrite(LED_BUILTIN, LOW); delay(1000); }
void setup() { pinMode(LED_BUILTIN, OUTPUT); } void loop() { delay(1000); }
void setup() { pinMode(LED_BUILTIN, INPUT); } void loop() { digitalWrite(LED_BUILTIN, LOW); delay(500); }
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you control the delay of an LED blinking in Arduino?
Connect a potentiometer to vary the blinking delay.
Adjust the LED brightness to change the blinking rate.
Use the 'delay(milliseconds)' function to set the blinking interval.
Use the 'setInterval(milliseconds)' function to control the blinking speed.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the setup() function in an Arduino sketch?
The setup() function is for defining custom libraries.
The setup() function is used to read sensor data.
The setup() function runs the main loop of the program.
The setup() function initializes the Arduino environment.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you connect an LED to an Arduino board?
Connect the LED directly to the power supply without a resistor.
Connect the anode of the LED to a digital pin and the cathode to ground through a resistor.
Connect both the anode and cathode of the LED to the same digital pin.
Connect the cathode of the LED to a digital pin and the anode to ground.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax to create a variable in Arduino C++?
dataType variableName = initialValue;
variableName = dataType initialValue;
dataType = variableName initialValue;
initialValue variableName: dataType;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you read the state of a button in Arduino?
Set pinMode(pinNumber, OUTPUT) before reading the button.
Use analogRead(pinNumber) to check the button state.
Use digitalRead(pinNumber) after setting pinMode(pinNumber, INPUT).
Read the button state using readButton(pinNumber).
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the function of the loop() in an Arduino program?
The loop() function runs only once at the start of the program.
The loop() function initializes the Arduino hardware.
The loop() function runs continuously to execute the main code of an Arduino program.
The loop() function is used to define the setup of the program.
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Arduino 2

Quiz
•
7th Grade
15 questions
7th PWM, Potentiometer, button

Quiz
•
7th Grade
10 questions
Fire Fighting

Quiz
•
3rd Grade - Professio...
16 questions
Evaluación parcial Robótica 6toP

Quiz
•
6th Grade - University
15 questions
Cooking Equip. - Part 1

Quiz
•
7th - 8th Grade
10 questions
Clothing Care

Quiz
•
6th - 8th Grade
13 questions
Arduino

Quiz
•
7th Grade
15 questions
Microbit Quiz

Quiz
•
6th - 8th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Other
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
43 questions
LinkIt Test - 24-25_BM4_7th

Quiz
•
7th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
14 questions
One Step Equations

Quiz
•
5th - 7th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
37 questions
7th Grade Summer Recovery Review

Quiz
•
7th Grade
18 questions
Informational Text Vocabulary

Quiz
•
7th - 8th Grade