WorksheetsDay2 Quiz Arduino
Total questions: 10
Worksheet time: 7mins
Why do we use the pinMode function?
It helps us to organize our code
It's a fancy anime skill name and it's cool
Because we want to pin our mode sometimes
pinMode allos us to set the digital pin that we want to either OUTPUT or INPUT mode
Which of the following is/are correct?
Which of the following statement(s) is/are true?
digitalWrite either output a 5V (high) or a 0v (low/ground)
digitalWrite either output a 3.3V (high) or a 0v (low/ground)
When using digitalRead(8), supplying 0v on pin 8 will give us a HIGH on the respective pin
When using digitalRead(8), supplying 0v on pin 8 will give us a LOW on the respective pin
From the official Arduino IDE, you cannot upload the code and use the Serial monitor if you didn't connect your Arduino to your computer
True
False
Every electronic has a (a) , it can either be source or sink (give or take), if we exceed the limit we will damage or blow up the electronic
Arduino will remember whatever code you uploaded to it, and every time you power up the Arduino it will run the setup function, and then keep repeating the loop function
True
Sometimes True
Sometimes False
False
What is/are the difference(s) between active and passive buzzer?
Active buzzer only output 1 frequency of sound, while passive buzzer can output from 50hz - 14000hz
Active buzzer is more active than a passive buzzer
We control the passive buzzer by using Arduino's tone function, and we can possibly make music out of it
Active buzzer is usually expensiver and bigger, while passive buzzer is not
What below is/are true about a condition in Programming?
It's either true or false
usually made up by relational operator, but not all the time
the state of something with regard to its appearance, quality, or working order.
We use it in places such as if, for, and while, these control statements will only run when the condition is true
What is/are the difference(s) between while and for loop?
We use for loop when we know how many times the loop will run, we use while loop when we want the loop to terminate based on a condition instead of the number of times it runs
They make no difference at all
while loop is not based on condition while for loop is based on condition
The body code of while loop will run when the condition is false, the body code of for loop will run when the condition is true
if statement is useful because we can check whether the condition is true or not before we decide to execute the particular line of code (e.g. checking the day in a week)
Correct
Incorrect
