Question: How do you include an external library in your Arduino sketch? a . import b . load c . #include d . require e .

How do you include an external library in your Arduino sketch?
a. import
b. load
c. #include
d. require
e. None of the above 22. Which keyword is used to define an array in Arduino?
a. list
b. vector
c. array
d. None of the above
23. Which library is used for I2C communication?
a. SPI
b. Wire
c. Serial
d. Ethernet
e. None of the above
24. How do you include an external library in your Arduino sketch?
a. import
b. load
c.\#include
d. require
e. None of the above
25. What does the following code output?
c
Copy code
int arr[]=\{10,20,30\};
Serial.print(arr[1]);
a.10
b.20
c.30
d.0
e. None of the above
Section 6: Interrupts and Timers
26. What is the purpose of a hardware interrupt in Arduino?
a. To generate random numbers
b. To pause the microcontroller indefinitely
c. To respond immediately to external events
d. To control PWM signals
e. None of the above
27. Which function is used to attach an interrupt to a pin in Arduino?
a. interruptAttach()
b. pinInterrupt)
c. attachInterrupt()
d. setInterrupt()
e. None of the above
28. What is the name of the timer configuration register for Timer 1 on the ATmega328?
a. TCCR1A
b. TCCR0B
c. TMR1
d. TIMER1_CFG
e. None of the above
29. Which timer mode allows for precise interval measurement in Arduino?
a. Normal mode
b. PWM mode
c. CTC mode
d. Fast PWM mode
e. None of the above 30. What is the maximum value of Timer 0 on an Arduino Uno?
a.1023
b.255
c.511
d.4095
e. None of the above
Section 7: Watchdog Timers
31. What is the primary purpose of the watchdog timer?
a. To prevent overheating of the Arduino board
b. To reset the microcontroller if it becomes unresponsive
c. To manage power consumption
d. To control peripheral devices
e. None of the above
32. Which register is used to configure the watchdog timer on an ATmega328?
a. WDTCSR
b. WD_CFG
c. WDTSET
d. TCCR_WDT
e. None of the above
33. What happens when the watchdog timer is not reset in time?
a. The program restarts from the beginning
b. The microcontroller enters sleep mode
c. The program continues as normal
d. A warning message is sent to the Serial Monitor
e. None of the above
34. Which function is used to reset the watchdog timer in Arduino?
a. watchdogReset ()
b. wdt_reset ()
c. resetWDT ()
d. clearWatchdog()
e. None of the above
35. What is the typical timeout period of the watchdog timer in Arduino?
a.15 ms
b.500 ms
c.1 second
d. Configurable
e. None of the above
Section 8: Sleep Modes and Power Management
36. Which library is commonly used for sleep modes in Arduino?
a. Timer
b. Wire
c. LowPower
d. Serial
e. None of the above
37. Which sleep mode consumes the least power on the ATmega328?
a. Idle mode
b. Power-save mode
c. Power-down mode
d. ADC noise reduction mode
e. None of the above
38. What is the primary purpose of sleep modes in microcontrollers?
a. Increase clock speed
b. Reduce power consumption
c. Improve sensor accuracy
d. Maintain serial communication
e. None of the above
39. What can wake up the Arduino from sleep mode?
a. External interrupt
b. Watchdog timer
c. Serial data reception
d. All of the above
e. None of the above
40. Which function is used to enable sleep mode?
a. entersleep ()
b. sleepMode ()
Extra Credit: Wireless Communication
46. Which of the following modules supports Bluetooth communication with Arduino?
a. ESP8266
b. HC-05
c. nRF24L01
d. Zigbee
e. None of the above
47. What is the frequency band of the nRF24L01 module?
a.433 MHz
b.2.4 GHz
c.5 GHz
d.900 MHz
e. None of the above
48. Which library is used to communicate with Wi-Fi modules like the ESP8266?
a. SPI
b. Wire
c. WiFi
d. Ethernet
e. None of the above 49. What is the primary function of the MQTT protocol in wireless communication?
a. File sharing
b. Messaging between IoT devices
c. Wireless firmware updates
d. Remote debugging
e. None of the above
50. Which Arduino board comes with built-in Wi-Fi and Bluetooth capabilities?
a. Arduino Uno
b. Arduino Nano
c. Arduino Nano 33 IoT
d. Arduino Mega
e. None of the above
How do you include an external library in your

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!