WorksheetsInterfacing Switch with Arduino
Total questions: 10
Worksheet time: 5mins
1. Why would Tisha connect a switch to an Arduino?
a) To control the switch's color
b) To predict the switch's behavior
c) To create music with the switch
d) To detect when the switch is pressed or released
3. What is the purpose of a pull-up resistor when connecting a button to a Raspberry Pi?
a) To pull the button down
b) To pull the button up
c) To change the button's shape
d) To predict the button's future actions
6. In a classroom setting, what does the digitalRead() function return when the switch is pressed?
a) The switch's color
b) "On"
c) 1
d) HIGH
What is the default state of a light switch when turned off?
a) On
b) Off
c) Depends on the type of bulb connected
d) Not specified
10. How can you ensure stable operation when interfacing a switch with Arduino in a noisy classroom environment?
a) By predicting the noise's frequency
b) By using noise-cancelling headphones
c) By adding hardware and software debounce mechanisms and proper grounding
d) By changing the switch's position
