NEW
Font size
WorksheetsArduino Programming Quiz
Total questions: 11
Worksheet time: 6mins
In the LED Example, Which Arduino pin is defined to control the LED?
8
12
13
2
What is the purpose of the pinMode function in the Arduino code?
To set the defined pin as input or output
To turn the LED on
To delay the program
To define the LED pin number
Which function is used to turn the LED ON in the code?
digitalWrite(myLED, LOW)
pinMode(myLED, OUTPUT)
delay(1000)
digitalWrite(myLED, HIGH)
In this code, explain the sequence of operations that occur in the loop() function of the code.
LED turns ON, waits 1 second, turns OFF, waits 1 second, repeats
LED turns OFF, waits 1 second, turns ON, waits 1 second, repeats
LED turns ON, waits 2 seconds, turns OFF, waits 2 seconds, repeats
LED turns ON, turns OFF, repeats without delay
In this Code, How does the use of #define help us do?
It turns the LED ON
It sets the pin mode to output
It assigns a name to the pin number where the LED is connected
It delays the program
In this code, which term is used to read the value from the potentiometer?
digitalWrite()
analogRead()
pinMode()
Serial.begin()
What type of device is a potentiometer?
Analog Input Device
Digital Output Device
Analog Output Device
Digital Input Device
Which statement best describes the role of a 'Serial Monitor'?
It powers the Arduino board
It displays information from the Arduino
It stores the code
It controls the potentiometer
What was the maximum value we got from the potentiometer using analogRead() in Arduino?
4095
255
512
1023
Which function is used to start the Serial communication in the Arduino code?
Serial.setup()
Serial.start()
Serial.begin()
Serial.init()
What is the purpose of the delay function in the Arduino code?
To initialize the Serial communication
To turn the LED OFF
To read sensor values
To pause the program for a specified time
