Font size
WorksheetsIOT Quiz
Total questions: 11
Worksheet time: 8mins
Enter Student Name and ID
What is the purpose of the void setup() function in the Blink example?
To initialize the serial communication
To set the LED pin as output
To turn the LED on
To turn the LED off
What is the role of the pushButton variable in the Digital Read Serial example?
It stores the pin number for the button
It stores the state of the button
It initializes the button
It sets the button as input
How does the Fading a LED example control the brightness of the LED?
By using analogWrite to set brightness
By using digitalWrite to turn it on and off
By changing the resistance
By changing the voltage
What is the purpose of the microsecondsToInches function in the Ping Ultrasonic Range Finder example?
To convert duration to inches
To convert duration to centimeters
To measure distance
To initialize the sensor
What happens when the sensorReading in the Detect a Knock example exceeds the threshold?
The LED state toggles
The sensor stops reading
The program ends
The serial communication stops
What is the function of the loop() method in the Blink example?
To set up the hardware
To read sensor data
To initialize variables
To run the code repeatedly
In the Detect a Knock example, what does the program do when a knock is detected?
It stops all operations
It sends a notification
It toggles the LED state
It resets the sensor
What is the purpose of the pinMode function in the Digital Read Serial example?
To write a value to the pin
To read the pin state
To initialize the serial communication
To set the pin as input or output
What is the significance of the loop() method in Arduino sketches?
It sets up the hardware
It runs continuously after setup()
It initializes variables
It runs once at the start
What is the purpose of the digitalRead function in the Digital Read Serial example?
To initialize the pin
To set the pin mode
To write a value to a pin
To read the value from a pin
