unit 4 mcq iot
unit 4 mcq iot
A) To act as a microprocessor
B) To simplify the process of creating control systems
C) To store large amounts of data
D) To replace a computer entirely
A) Microcontroller chip
B) On-board power supply
C) USB port for communication with PC
D) High-end graphics processor
A) Bluetooth
B) Wi-Fi
C) USB port
D) Ethernet cable
A) Mega
B) LilyPad
C) UNO
D) Nano
Answer: C) UNO
A) UNO
B) Mega
C) LilyPad
D) Nano
Answer: C) LilyPad
5. What is the primary difference between the Nano and UNO boards?
A) The Nano is more complex and has more I/O pins than the UNO
B) The Nano is more compact and has similar functionality to the UNO
C) The Nano is only for use in wearables
D) The UNO has more I/O pins than the Nano
Answer: B) The Nano is more compact and has similar functionality to the UNO
A) ATmega328
B) ATmega2560
C) ATmega32
D) ATtiny85
Answer: B) ATmega2560
7. What is a key feature of the LilyPad Arduino board?
A) It can be sewn to fabric and connected to power supplies for wearable projects
B) It is designed for large-scale industrial projects
C) It has more digital and analog I/O pins than the Mega
D) It supports high-speed data transfer via USB
Answer: A) It can be sewn to fabric and connected to power supplies for wearable projects
A) LilyPad
B) Mega
C) Nano
D) UNO
Answer: C) Nano
1. How many digital I/O pins are available on the Arduino UNO?
A) 10
B) 12
C) 14
D) 16
Answer: C) 14
2. How many of the digital pins on the Arduino UNO support PWM (Pulse
Width Modulation)?
A) 2
B) 4
C) 6
D) 8
Answer: C) 6
3. Which of the following digital pins on the Arduino UNO supports PWM?
A) Pin 2
B) Pin 4
C) Pin 6
D) Pin 12
Answer: C) Pin 6
4. How many analog input pins are available on the Arduino UNO?
A) 4
B) 6
C) 8
D) 10
Answer: B) 6
A) A0 to A5
B) A0 to A7
C) A1 to A6
D) A2 to A8
Answer: A) A0 to A5
6. Which of the following pins on the Arduino UNO is NOT a digital I/O pin?
A) Pin 0
B) Pin 5
C) Pin 12
D) Pin A4
Answer: D) Pin A4 (This is an analog input pin, not a digital I/O pin)
7. The analog pins on the Arduino UNO can accept what type of values?
A) 0, 2, 4, 6, 8, 10
B) 3, 5, 6, 9, 10, 11
C) 2, 4, 6, 8, 10, 12
D) 1, 3, 5, 7, 9, 11
Answer: B) 3, 5, 6, 9, 10, 11
3. How many Ground Pins are there on an Arduino board, and what is their
function?
4. Which pins on the Arduino board are used for Digital Input/Output?
A) Pins A0 to A5
B) Pins 0 to 13
C) Pins 14 to 20
D) Pins 1 to 6
Answer: B) Pins 0 to 13
A) Power LED
B) Voltage Regulator
C) ATmega Microcontroller
D) Reset Button
9. What does the Power LED Indicator on the Arduino board signify?
10. What is the function of the Voltage Regulator on the Arduino board?
A) 5V Pin
B) DC Power Jack
C) 3.3V Pin
D) Ground Pin
A) Ground Pin
B) 5V Pin
C) 3.3V Pin
D) AREF Pin
Answer: B) 5V Pin
Answer: C) To read signals from analog sensors and convert them to digital values
A) Analog Reference
B) Analog Reset
C) Alternative Reference
D) Analog Reset Enable
4. Which pins on the Arduino board are used for Digital Input/Output?
A) Pins 0-7
B) Pins 0-13
C) Pins A0-A5
D) Pins 1-10
5. What is the function of the PWM pins on the Arduino board, marked with a
(~) symbol?
Answer: B) They simulate analog output signals by modulating the pulse width
A) TX/RX Pins
B) ATmega Microcontroller
C) Voltage Regulator
D) USB Connection
9. What does the Power LED Indicator on the Arduino board signify?
10. What is the purpose of the Voltage Regulator on the Arduino board?
Answer: B) To control and regulate the amount of voltage going into the Arduino
11. What is the function of the DC Power Barrel Jack on the Arduino board?
Answer: B) To supply power to the Arduino board from an external power source
Sure! Here are some multiple-choice questions (MCQs) based on the concept of Arduino as a
physical computing platform:
A) Actuators
B) Sensors
C) Outputs
D) Both A and B
A) Temperature sensor
B) Motor
C) Light sensor
D) Thermistor
Answer: B) Motor
A) Actuator
B) Sensor
C) Microcontroller
D) Output device
Answer: B) Sensor
A) Microphone
B) Servo motor
C) LED display
D) Photocell
8. Which of the following is true about the interaction between inputs and
outputs in a physical computing system?
A) Inputs provide data that is processed to control outputs
B) Outputs collect data from the environment
C) Inputs directly control outputs without any processing
D) Inputs and outputs are not connected in a physical computing system
Answer: C) A device that collects information from the physical world and sends it to the
microcontroller
10. In a physical computing system, which part of the system typically interfaces
with the human user?
A) Sensors
B) Actuators
C) Software running on the microcontroller
D) Input and output devices
Answer: B) Actuators
3. What function does the USB port serve in the AVR microcontroller system?
Answer: B) Allows serial communication between the microcontroller and external devices
4. What types of pins are integrated into the AVR microcontroller for interacting
with external devices?
A) In the RAM
B) In the Flash memory
C) In the I/O pins
D) In the CPU registers
A) Flash memory
B) USB port
C) Voltage regulator
D) Oscillator circuit
A) ROM
B) RAM
C) Flash memory
D) EEPROM
A) 12.5 MHz
B) 16 MHz
C) 8 MHz
D) 32 MHz
Answer: B) 16 MHz
2. How much Flash program memory is available on the Arduino UNO (ATmega
328)?
A) 2 KBytes
B) 16 KBytes
C) 32 KBytes
D) 64 KBytes
Answer: C) 32 KBytes
3. What is the size of SRAM available on the Arduino UNO (ATmega 328)?
A) 1 KByte
B) 2 KBytes
C) 4 KBytes
D) 8 KBytes
Answer: B) 2 KBytes
4. How many digital input/output pins are available on the Arduino UNO
(ATmega 328)?
A) 6
B) 8
C) 14
D) 16
Answer: C) 14
5. How many analog input pins are provided by the Arduino UNO (ATmega
328)?
A) 4
B) 6
C) 8
D) 10
Answer: B) 6
6. How many analog output pins (PWM) does the Arduino UNO (ATmega 328)
have?
A) 4
B) 6
C) 8
D) 10
Answer: B) 6
7. Which part of the memory on the Arduino UNO (ATmega 328) is used by the
bootloader?
A) 2 KBytes
B) 16 KBytes
C) 32 KBytes
D) 0.5 KBytes
A) 8-bit
B) 16-bit
C) 32-bit
D) 64-bit
Answer: A) 8-bit
9. Which of the following is true about the Arduino UNO (ATmega 328) Flash
program memory?
10. Which component in the Arduino UNO (ATmega 328) defines the processing
speed of the microcontroller?
A) SRAM
B) Flash memory
C) Clock speed
D) Digital input pins
Answer: B) It runs once at the beginning to initialize settings, such as pin modes.
3. What happens when you press the reset button on an Arduino board?
4. Which type of variables are declared and initialized outside of functions and
can be accessed globally in the Arduino program?
A) Local variables
B) Global variables
C) Static variables
D) Temporary variables
A) It initializes variables.
B) It runs once at the beginning.
C) It contains the main code and runs repeatedly after the setup() function.
D) It is used to reset the board.
Answer: C) It contains the main code and runs repeatedly after the setup() function.
6. Which of the following statements is true about global variables in Arduino?
Answer: B) Global variables are declared outside of functions and can be accessed throughout
the program.
8. How can you make a variable accessible throughout your Arduino program?
A) The program halts and waits for the user to press reset.
B) The loop() function starts and runs repeatedly.
C) The Arduino enters sleep mode.
D) The program resets and re-executes from the setup() function.
1. Which of the following is a key feature of the text editor in the Arduino IDE?
Answer: B) It provides quick access to common functions like compiling, uploading, and
opening files.
A) Text editor
B) Toolbar
C) Text console
D) Serial monitor
Answer: C) To convert the written code into machine code that the microcontroller can execute
5. What function does the Serial Monitor serve in the Arduino IDE?
Answer: B) It allows you to debug the program by displaying data sent to/from the Arduino over
the COM serial port.
6. Which part of the Arduino IDE displays real-time data sent by the Arduino
board through the COM serial port?
A) Text editor
B) Compiler
C) Serial Monitor
D) Text Console
7. In the Arduino IDE, which component is used to check for errors or output
information during the compilation process?
A) Serial Monitor
B) Text Console
C) Compiler
D) Toolbar
9. What happens when you press the "Upload" button in the Arduino IDE?
10. What is the primary function of the Serial Monitor in the Arduino IDE?
Answer: B) To monitor and debug data communication between the Arduino and the computer
A) Proprietary language
B) Open source computer programming language
C) Assembly language
D) Visual programming language
A) Python
B) Java
C) C/C++
D) Pascal
Answer: C) C/C++
3. Which of the following best describes the changes made to the C/C++ language
in Arduino programming?
Answer: B) There are slight simplifications and modifications to make it easier for hardware
control.
A) Integer
B) Float
C) Long
D) String (with no limitations)
A) println()
B) if, switch/case, while, for
C) delay()
D) analogWrite()
Answer: B) if, switch/case, while, for
A) Project
B) Circuit
C) Sketch
D) Code Block
Answer: C) Sketch
A) Byte
B) Double
C) Character
D) String (only for fixed-size strings)
Answer: C) Character
10. Which of the following is true about the Arduino programming environment?
A) 9600
B) 115200
C) 57600
D) 12345
Answer: D) 12345
4. What does the Serial.print(" ") function do in the Arduino IDE?
5. Which of the following functions is used to set the state of a digital pin on the
Arduino?
A) analogWrite()
B) pinMode()
C) digitalWrite()
D) digitalRead()
Answer: C) digitalWrite()
A) digitalRead()
B) analogWrite()
C) analogRead()
D) pinMode()
Answer: C) analogRead()
8. What is the purpose of the analogWrite(pin, intValue) function in Arduino?
Answer: A) It pauses the program for a specified amount of time (in milliseconds).
10. Which of the following functions would you use to wait for a specified period
in an Arduino program?
A) delay(milliseconds)
B) wait(milliseconds)
C) pause(milliseconds)
D) sleep(milliseconds)
Answer: A) delay(milliseconds)
Here are multiple-choice questions (MCQs) based on the bare minimum code structure in
Arduino programming:
Answer: B) It is used to initialize variables, set pin modes, and start libraries.
2. How many times does the setup() function run in an Arduino sketch?
Answer: C) To run code repeatedly, allowing the program to respond and change dynamically.
5. Which section of the Arduino sketch allows you to write code that runs
repeatedly?
A) setup()
B) loop()
C) initialize()
D) main()
Answer: B) loop()
6. What is the relationship between the setup() and loop() functions in an
Arduino sketch?
A) The setup() function runs only once, while the loop() function runs repeatedly.
B) The setup() function runs continuously, while the loop() function runs only once.
C) Both functions run continuously in parallel.
D) The setup() function runs repeatedly after the loop() function finishes.
Answer: A) The setup() function runs only once, while the loop() function runs repeatedly.
7. In the bare minimum Arduino code, where do you typically initialize variables
and configure pin modes?
Answer: C) To control the board and allow it to interact with hardware components
continuously.
9. Which of the following is true about the execution flow of an Arduino sketch?
A) The setup() function runs continuously while the loop() function runs once.
B) The setup() function runs once, and then the loop() function runs repeatedly.
C) The loop() function runs once, and then the setup() function runs repeatedly.
D) Both setup() and loop() functions run together in parallel.
Answer: B) The setup() function runs once, and then the loop() function runs repeatedly.
10. What happens if the loop() function contains no code in an Arduino sketch?
1. Which of the following data types in Arduino is used to store whole numbers?
A) float
B) int
C) char
D) String
Answer: B) int
2. Which data type would you use to store a value between 0 and 255?
A) long
B) byte
C) short
D) int
Answer: B) byte
A) int
B) char
C) String
D) bool
Answer: B) char
5. What is the range of values that a long variable can store in Arduino?
A) -32,768 to 32,767
B) -2,147,483,648 to 2,147,483,647
C) 0 to 255
D) 0 to 65,535
A) char
B) bool
C) int
D) float
Answer: B) bool
7. What is the maximum number of elements you can store in an array of int if it
is defined as int numbers[5];?
A) 255
B) 32,767
C) 5
D) 0
Answer: C) 5
8. Which data type in Arduino is used to store a string of characters?
A) String
B) char
C) bool
D) long
Answer: A) String
9. Which of the following data types can store decimal numbers in Arduino?
10. Which of the following is used to create a custom user-defined data type in
Arduino?
A) int
B) char
C) struct or class
D) float
11. What is the range of values that a short variable can store in Arduino?
A) -32,768 to 32,767
B) 0 to 255
C) -2,147,483,648 to 2,147,483,647
D) 0 to 65,535
A) A single variable that can hold multiple values of the same type.
B) A variable that can store only one value at a time.
C) A class used to manage text data.
D) A data type used to store a single decimal number.
Answer: A) A single variable that can hold multiple values of the same type.
13. What is the main advantage of using the String class in Arduino?
A) To store integers
B) To store floating-point numbers
C) To store truth values (either true or false)
D) To store characters
15. Which of the following data types uses 1 byte of memory in Arduino?
A) long
B) int
C) byte
D) double
Answer: C) byte
Answer: B) To send data from the Arduino to the computer and vice versa
A) It sets the baud rate for serial communication between the computer and the Arduino.
B) It sends data to the Serial Monitor at the specified baud rate.
C) It initializes the Serial Monitor at a fixed baud rate of 9600.
D) It sets the speed of the Arduino’s clock.
Answer: A) It sets the baud rate for serial communication between the computer and the
Arduino.
A) Sends data to the Serial Monitor and then prints a newline character.
B) Initializes serial communication at a baud rate.
C) Reads data from the Serial Monitor.
D) Checks the number of bytes available in the serial buffer.
Answer: A) Sends data to the Serial Monitor and then prints a newline character.
5. Which function in Arduino is used to check how many bytes are available to
read from the serial buffer?
A) Serial.print()
B) Serial.read()
C) Serial.available()
D) Serial.println()
Answer: C) Serial.available()
6. Which of the following is NOT a valid baud rate option for Serial.begin() in
Arduino?
A) 9600
B) 115200
C) 14400
D) 1000000
Answer: C) 14400
8. How can you send data from the computer to the Arduino using the Serial
Monitor?
A) By typing text in the input field and pressing Enter or clicking the "Send" button.
B) By connecting a serial cable to the computer.
C) By using the Serial.write() function in the sketch.
D) By uploading a sketch to the Arduino.
Answer: A) By typing text in the input field and pressing Enter or clicking the "Send" button.
9. Which function would you use to initialize serial communication at a baud rate
of 115200?
A) Serial.begin(9600)
B) Serial.begin(115200)
C) Serial.start(115200)
D) Serial.setBaud(115200)
Answer: B) Serial.begin(115200)
Answer: B) Send the word "Hello" to the Serial Monitor, without a newline.
Answer: B) Data sent from the Arduino board via the serial port
12. Which of the following is a common use of the Serial Monitor in Arduino
programming?
A) Serial.write()
B) Serial.print()
C) Serial.println()
D) Serial.read()
Answer: A) Serial.write()