Nothing Special   »   [go: up one dir, main page]

Arduino

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

1. What is Arduino?

a) Programming language
b) Image editing software
c) Open-source electronics platform
d) Text editor
View Answer
Answer: c
Explanation: Arduino is an open-source hardware and software platform that is easy
to use. Arduino boards are capable of reading analog or digital input signals from
various sensors.

2. How many types of Arduino do we have?


a) 4
b) 8
c) 12
d) 16
View Answer
Answer: b
Explanation: There are 4 Arduino boards and 4 Arduino shields that fit on top of
Arduino compatible boards to provide additional capability like connecting to the
internet, motor controller, LCD screen controlling, etc..

3. What language is a typical Arduino code based on?


a) Assembly Code
b) Python
c) Java
d) C/C++
View Answer
Answer: d
Explanation: The Arduino code is basically a lightly modified version of the C++
programming language. It includes certain functions or modules that are specific to
the development of the Arduino platform and was preinstalled in the language by the
developers.

4. Arduino shields are also called as _________


a) Another Arduinos
b) Extra peripherals
c) Add on modules
d) Connectivity modules
View Answer
Answer: c
Explanation: The Arduino boards can connect with add- on modules termed as
shields. Multiple, and possibly stacked shields may be individually addressable via
an I2C serial bus.
5. What language is the Arduino IDE built on?
a) Java
b) HTML
c) C/C++
d) Python
View Answer
Answer: a
Explanation: The Arduino code is primarily a subset of the C++ programming
language. However, the IDE (Integrated Development Environment) was written in
the Java programming language. An IDE is a software that provides primarily a
graphical user interface for compiling and maintaining/editing code for a platform.

6. How many analog pins are used in Arduino Mega board?


a) 12
b) 16
c) 8
d) 14
View Answer
Answer: b
Explanation: It has lots of digital input/output pins, 14 can be used as PWM output
16 analog inputs, a USB connection, a power jack, and a reset button.

7. Arduino IDE consists of 2 functions. What are they?


a) Loop() and build() and setup()
b) Build() and loop()
c) Setup() and build()
d) Setup() and loop()
View Answer
Answer: d
Explanation: Setup() is called once in the program when a sketch starts after power-
up. It is used to initialixe variables, input and output pin modes, and other libraries
needed in the sketch.
Loop() is used after setup() been called, function loop() is executed repeatedly in the
main program. It controls the board until the board is powered off or is reset.

8. Arduino Codes are referred to as ________ in the Arduino IDE.


a) sketches
b) drawings
c) links
d) notes
View Answer
Answer: a
Explanation: Any Arduino Code that is saved using the Arduino IDE, is referred to as
a “sketch” by the Arduino IDE. These “sketches” are nothing but the code saved in a
file with the extension name being “.ino”.
9. What is the default bootloader of the Arduino UNO?
a) AIR-boot
b) GAG
c) Optiboot bootloader
d) Bare box
View Answer
Answer: c
Explanation: The optiboot bootloader will take 512 bytes, leaving 32256 bytes for
application code. Due to its small size larger up-loadable sketch size is achieved.

10. What does p refer to in ATmega328p?


a) Programmable on chip
b) Power-Pico
c) Production
d) Pico-Power
View Answer
Answer: d
Explanation: Picopower technology employs advanced features like multiple clock
domains, DMA and event systems to minimize power consumption.

11. What is the use of the Arduino.h header file?


a) It enables the programmer to access all of Arduino’s core functionality
b) It doesn’t have any use and can be omitted at any point of time in the code
c) It gives root access to the microcontroller’s file system
d) It allows other people to create libraries for the Arduino code
View Answer
Answer: a
Explanation: The Arduino.h file is not something that we encounter during the
process of writing the code for the Arduino board because the preprocessor takes
care of it before compilation. However, it is a very important file without which we
cannot access the Arduino’s features like GPIO IO, Analog IO, etc.

12. What is the use of the Vin pin present on some Arduino Boards?
a) To ground the Arduino Board
b) To power the Arduino Board
c) To provide a 5V output
d) Is used for plugging in 3V supply
View Answer
Answer: b
Explanation: The Vin Pin can be used for accepting a 9V power supply which is
usually given through the external Jack. It can also be used for getting a 9V output
when the Arduino is powered through the Jack, thus acting as both a power source
and a short from the power source both when needed.
13. What is the correct execution process of an Arduino code?
a) Editor->Preprocessor->Compiler
b) Preprocessor->Editor->Compiler
c) Compiler->Preprocessor->Editor
d) Editor->Compiler->Preprocessor
View Answer
Answer: a
Explanation: The code that is written is first done so with the help of the editor.
Without the editor there will be no place where the programmer can write his or her
code. After that the code is handed over to the preprocessor and finally the compiler
which translates the code into the Arduino’s Assembly Instruction Set.

14. What is the microcontroller used in Arduino UNO?


a) ATmega32114
b) AT91SAM3x8E
c) ATmega2560
d) ATmega328p
View Answer
Answer: d
Explanation: ATmega328p is a microcontroller which is 32KB of flash ROM and 8-bit
microcontroller.

15. Which board is the first to use a microcontroller within the build USB?
a) RedBoard
b) Leonardo
c) LilyPad
d) UNO
View Answer
Answer: b
Explanation: The Leonard is Arduino’s first development board to use one
microcontroller with built-in USB. This means that it can be cheaper and simple, And
also, code libraries are available which allow the board to emulate a computer
keyboard etc.

16. Which Arduino Board contains an onboard joystick?


a) Arduino Nano
b) Arduino UNO
c) Arduino Esplora
d) Arduino Due
View Answer
Answer: c
Explanation: The Arduino Esplora comes with the Atmega32u4 and is based on the
Leonardo Hardware. It comes preinstalled with a lot of things including a joystick,
buttons, TFT Connector for attaching to external LCD’s, an RGB LED, etc. Due to its
configuration and setup, it is perfect for beginners to use.
17. What is the function of the IOREF pin on the Arduino UNO?
a) To take input voltage and set it as a reference for all GPIO operations
b) To provide a constant 12V DC supply
c) To provide ground
d) To provide the voltage corresponding to the standard GPIO working voltage of the
board
View Answer
Answer: d
Explanation: The IOREF pin provides the operation voltage reference for the
Arduino. Usually on most Arduino Boards that is 5V but on the Diecimila it is 3.3V
however. But this pin should not be at any given time connected to a load as power
source.

18. Which processor supports the Arduino Zero?


a) ARM Cortex M0+
b) ARM Cortex M3
c) Atmega32u4
d) Atmega328P
View Answer
Answer: a
Explanation: The Arduino Zero uses the Atmel Smart SAM D21 MCU featuring the
32-bit ARM Cortex M0+ CPU. It has a flash memory of 256K bytes and an SRAM of
32K bytes.

19. Which software is used to upload the Arduino Sketches to the board?
a) avrgcc
b) g++
c) cpython for windows
d) avrdude
View Answer
Answer: d
Explanation: The AVR-GCC/G++ software is a compiler which can take C/C++ code
as input and translate or compile it into Binary Code that follows the instruction set
for the AVR Microcontrollers. After that process is done, the avrdude software has
the job of uploading the hex file to the microcontroller, more specifically the AVR
Microcontroller family.

20. What is the use for the 2 serial pins on the Arduino Diecimila?
a) To send PWM signals
b) To send and receive Serial TTL signals
c) To send and receive GPIO digital signals
d) To receive analog signals
View Answer
Answer: b
Explanation: There are two pins for sending and receiving the Serial TTL Signals.
The TX (for transmission) and the RX (for receiving). In the Arduino Diecimila they
are connected to the corresponding pins of the FTDI USB to Serial Chip.

21. Which Arduino Boards use the Atmega2560?


a) Arduino Micro and Due
b) Arduino Nano and Fio
c) Arduino Mega and Mega ADK
d) Arduino Uno and Robot
View Answer
Answer: c
Explanation: Both the Arduino Mega and the Arduino Mega ADK use the
Atmega2560, however the only difference between the two boards is that the
Arduino Mega ADK was specifically built with Android phones in mind and has a
USB to host connector that can plug into your android smartphone.

22. What is the operating voltage of Atmega328?


a) 1.9V to 5V
b) 1.8V to 5.5V
c) 1.1V to 5V
d) 12V to 9V
View Answer
Answer: b
Explanation: The operating voltage of the Atmega328 is 1.8V to 5.5V. Provide any
voltage lower than that and the chip will not function. But however, if any voltage
higher than the rated voltage is provided there is a chance of damaging the IC
physically. So, under no circumstance should this chip be provided a voltage more
than the rated voltage.

23. Which Arduino Boards use the Atmega32U4?


a) Arduino Uno
b) None Mega
c) Arduino Micro
d) Arduino Leonardo
View Answer
Answer: d
Explanation: The Arduino Leonardo uses the Atmega32U4. Some other boards that
use this microcontroller include the Arduino Pro Micro, which is a smaller
development board than the Arduino Leonardo.

24. Is the Arduino code an Object-Oriented programming language or a Procedural


programming language?
a) The Arduino Code follows the Top-Down Procedural ideology
b) The Arduino Code follows a custom Procedural Ideology
c) The Arduino Code follows the Object-Oriented ideology
d) The Arduino Code follows the Bottom-Up Procedural ideology
View Answer
Answer: c
Explanation: Since the Arduino Programming Language is a subset of the C++
Programming Language, it supports the Object-Oriented Programming approach
much like C++.

25. What is the difference between an IDE and a compiler?


a) The compiler executes the code while the IDE gives a graphical environment for
writing the code
b) The compiler links the code to the respective files and the IDE takes it from there
c) The compiler and the IDE are the same thing
d) The IDE executes the code while the compiler gives a graphical environment for
writing the code
View Answer
Answer: a
Explanation: According to the primary definitions of a compiler and an IDE, the job of
debugging and executing a piece of code falls on the compiler, while the job of the
IDE is to provide an easy to use environment for writing the code in the first place.

26. What will be the output of the following Arduino code?

#define X 10;
void setup(){
X=0;
Serial.begin(9600);
Serial.print(X);
}
void loop(){
//Do nothing…
}

a) 0xAB
b) 0xa
c) 0
d) Error
View Answer
Answer: d
Explanation: In the above code we have attempted to modify the value of X which is
initialized using the preprocessing directive “define” which makes its value
unchangeable throughout the entire code. Thus, the compiler will throw an error.

27. Where does the Arduino IDE search if it needs to find out the Name of a type of
Arduino Board?
a) Arduino.h
b) build.txt
c) boards.txt
d) build.core
View Answer
Answer: c
Explanation: The different types of Arduino Boards which are also commonly
referred to as “Variants” are present in the boards.txt file. This is a particularly
important file because it contains the different configuration information for different
Arduino Boards like which compiler toolchain to execute on a particular variant.

28. How many times does the setup() function run on every startup of the Arduino
System?
a) 4
b) 5
c) 2
d) 1
View Answer
Answer: d
Explanation: The setup() function is used predominantly to configure the pins,
variables, Serial data, etc. and is executed only once throughout the entire cycle of
the program. However other than the above-mentioned uses, it can also be used to
execute technically all aspects of an Arduino program, but since it only runs one
time, it’s not very useful for anything other than configuring.

29. Which of the following statements is not true when dealing with the Firmata
library?
a) The Firmata Library uses the Firmata Protocol for communicating data
b) The Firmata Library uses the Midi Message Format
c) The Firmata Library can only be used on an Arduino Uno
d) The Firmata Library is used to establish communications between the Arduino
and the Desktop
View Answer
Answer: c
Explanation: The Firmata Library is used for communicating data to and from the
computer. This is required when the Arduino is required to store certain data on the
computer which would be otherwise too large for the Arduino to store in its internal
memory. Other uses of this library are in the field of IOT.

30. What is the output of “pin1” if “pin2” is sent “1011” where 1 is 5V and 0 is 0V?

1. int pin1 = 12;


2. int pin2 = 11;
3. void setup() {
4. pinMode(pin1, OUTPUT);
5. pinMode(pin2, INPUT);
6. Serial.begin(9600);
7. }
8. void loop() {
9. if(digitalRead(pin2)==1) {
10. digitalWrite(pin1,LOW);
11. }
12. else if(digitalRead(pin2)==0) {
13. digitalWrite(pin1,HIGH);
14. }
15. }

a) 1110
b) 0100
c) 1111
d) 1011
View Answer
Answer: b
Explanation: Here when pin2 receives a digital 1 we set pin1 as “LOW” or a digital 0,
and conversely when pin2 receives a digital 0 we set pin1 as “HIGH” or a digital 1.
Therefore, effectively generating the inverse of the wave that we received as input.

31. Which Arduino Board does the SigFox Library work with?
a) Arduino MKRFOX1200
b) Arduino MKRZero
c) Arduino MKRFOX1230
d) Arduino MKR1000
View Answer
Answer: a
Explanation: The SigFox Library allows the use of the SigFox transreceiver with the
Arduino MKRFOX1200 Board. It uses UNB (Ultra Narrow Band) to interconnect
remote devices. It’s a low energy device which falls in the category of LPWAN (Low
Powered Wide Area Network).

32. What technology does the OV7670 Camera Module use for image sub-
sampling?
a) ConstPix
b) Activarr
c) Tidal
d) VarioPixel
View Answer
Answer: d
Explanation: VarioPixel is the correct name of the sub-sampling technology used by
the OV7670 Camera Module. Sub-sampling in image processing is the process of
reducing the image size by removing information all together.

33. What will be the output of the following Arduino code?

void main() {
int a = 0;
double d = 10.21;
printf("%lu", sizeof(a + d));
}
void loop() {}

a) 10.21
b) 8
c) null
d) 23
View Answer
Answer: b
Explanation: The sizes of int and double are 4 and 8 respectively, a is an integer
variable whereas d is a double variable. The final result will be a double in this case
in order to keep the precision. Hence the output of the code is 8 bytes.

34. What is the use of the ESP8266 WiFi Module?


a) Network Provider
b) Switches circuits
c) Evaluates air pressure
d) Monitors Motion
View Answer
Answer: a
Explanation: The ESP8266 WiFi Module is basically a network provider module
which helps your micro-controller to connect to any WiFi network in the vicinity.

35. What is the full form of EEPROM?


a) Electrically Encoded Programmable Read Only Memory
b) Encrypted Electronic Programmable Read Only Memory
c) Electrically Erasable Programmable Read Only Memory
d) Electronic Embedded Programmable Read Only Memory
View Answer
Answer: c
Explanation: EEPROM is a type of non-volatile memory which can be programmed
and erased by voltage pulses as input. It’s used to handle small amounts of data.
Originally EEPROMs supported only small amounts of data handling limited to 1
Byte. But however, nowadays EEPROMs can support page operations of many
bytes.

36. Why is the Arduino Mega more a viable solution when dealing with complex
projects, than the Arduino UNO?
a) More flash memory on the Arduino Mega
b) Higher power rating on the Arduino Mega
c) Higher SRAM on the Arduino Mega
d) More number of GPIO pins on the Arduino Mega
View Answer
Answer: b
Explanation: The Arduino UNO has 14 pins for IO of which 6 support PWM, while
the Arduino Mega has 54 pins for IO of which 14 support PWM. Moreover, the
Arduino Mega uses the Atmega2560 microcontroller which has an SRAM of 4K
bytes and a flash memory of 256K bytes, whereas the Arduino UNO which is
supported by the Atmega328P microcontroller has an SRAM of only 2K bytes and a
flash memory of a mere 32K bytes.

37. The Atmega168 is an ________ bit chip.


a) 32
b) 64
c) 8
d) 16
View Answer
Answer: c
Explanation: The Atmega168 is capable of processing 8 bits of data at a time and
hence it has an 8-bit architecture. Other similar 8-bit processors include the Intel
8080 Processor which ran on a similar 8-bit architecture.

38. Why does every compilation of a source code in Arduino check for previous
compilations?
a) To copy the previously generated “.o” files
b) To relocate the previously generated “.o” files
c) To delete the previously generated “.o” files
d) To use the previously generated “.o” files
View Answer
Answer: d
Explanation: During the compilation process, the Arduino compiler before
compilation searches for previously generated “.o” files in the directory, to make the
compilation process faster in some cases. This reduces the redundancy of compiling
the same parts of the code repeatedly.

39. What type of signal does the analogWrite() function output?


a) Pulse Code Modulated Signal
b) Frequency Modulated Signal
c) Pulse Width Modulated Signal
d) Pulse Amplitude Modulated Signal
View Answer
Answer: c
Explanation: The Pulse Width Modulated Signal is the one which is transmitted by
the analogWrite() function. This is done in an attempt to replicate the analog
functionality to control certain sensors and actuators.

40. What is the objective of the code given below if it is executed on the Arduino
Uno?
1. #include<EEPROM.h>
2. int pin=13;
3. void setup() {
4. pinMode(pin,OUTPUT);
5. Serial.begin(9600);
6. }
7. void loop() {
8. for(int i=0;i<EEPROM.length();i++) {
9. EEPROM.write(i, 1);
10. }
11. digitalWrite(pin,HIGH);
12. exit(0);
13. }

a) Clear EEPROM
b) Fill EEPROM with 1’s
c) Export EEPROM data
d) Fill EEPROM with 0’s
View Answer
Answer: b
Explanation: The EEPROM.write() function is used to write data to the EEPROM
directly. This function takes in 2 argurments; the address to which the data is to be
written, and the data which is to be written to the EEPROM in the specified address.
The program fills the EEPROM with 1’s and then turns on the onboard LED of the
Arduino Uno.
41. What is the use of the SD.h Library in Arduino?
a) To communicate with the computer
b) To communicate with the internet
c) To communicate with the SD Card Module
d) To communicate with another microcontroller
View Answer
Answer: c
Explanation: The SD.h Library in Arduino allows for communications between the
Arduino Board and an SD Card Module for storage and retrieval of data. It is
dependent on the sdfatlib library which works on FAT16 and FAT32 filesystems.

42. What is the use of the Ethernet library?


a) To connect the Arduino to Ethernet
b) To connect the Arduino to Li-Fi
c) To connect the Arduino to Bluetooth
d) To connect the Arduino to Wi-Fi
View Answer
Answer: a
Explanation: The Ethernet Library is used to connect the Arduino to the internet via
an Ethernet connection. This library is designed to be used with any Arduino
Ethernet Shields or any other W5100, W5200, etc. based devices.
43. What is the purpose of the following Arduino code?

1. void setup() {
2. Seria.begin(9600);
3. }
4. void setup() {
5. Serial.write(40);
6. }

a) Send a signal to pin 40 on the Arduino board


b) Send a octal number of 40 through the Serial pins
c) Send a byte with value 40 through the Serial pins
d) Send a hexadecimal number of 40 through the Serial pins
View Answer
Answer: c
Explanation: The above code uses the serial pins on the Arduino Board. The data is
sent in the form of a byte whose value is 40. This data is processed into a data
packet where the additional sections are added to number 40 and then send using
UART.

44. Which chipset is the LCD library for Arduino based on?
a) Hitachi HDD4780
b) Hitachi HD46780
c) Hitachi HD45780
d) Hitachi HD44780
View Answer
Answer: d
Explanation: The LCD Library in Arduino allows for controlling LCD Displays with the
Arduino. This is based on the Hitachi HD44780 Chipset which is a dot matrix LCD
(Liquid Crystal Display) Driver. It can be configured and used with 4-bit and 8-bit
microcontrollers.

45. What is the resolution of the micros() function on the Arduino Nano?
a) 7 Microseconds
b) 4 Microseconds
c) 6 Microseconds
d) 2 Microseconds
View Answer
Answer: b
Explanation: The micros() function gives the up-time of the Arduino program in
microseconds. This function has a resolution, i.e. the intervals in which it gives an
output. This resolution depends on the Frequency of the specific Arduino Board that
its running on. On the Arduino Duemilanove it’s resolution is 4 Microseconds.

46. What is the use of the Interrupt Service Routine in an Arduino?


a) To boot up the arduino
b) To exit any code that is running
c) To automate functions
d) To make more memory
View Answer
Answer: c
Explanation: The interrupt service routine can be used to automate a number of
functions in an arduino. In a situation where the entire focus of the code is bound to
one function, the ISR can act as a pause for the arduino to stop the current function
temporarily and divert memory to another function. That way, the entire memory of
the arduino is used up in one function.

47. What is the output of the program given below if a voltage of 5V is supplied to
the pin corresponding to the A0 pin on an Arduino UNO?

void setup() {
Serial.begin(9600);
pinMode(A0, INPUT);
}
void loop() {
int s = analogRead(A0);
Serial.println(s);
}

a) 0
b) 1024
c) null
d) Error
View Answer
Answer: b
Explanation: The Arduino UNO’s analog pins map the value of the sensed voltage to
an internal numbering scale which makes it easier for the programmer to work since
it is more difficult to analog voltage levels in programming practice. Thus, for a value
of 5V, which reaches the maximum limit, we get a value of 1024.

48. What mode should we put the Arduino pin to, in order for object detection to
work with the Ultrasonic Sensor?
a) TDM
b) PCM
c) Analog
d) Digital
View Answer
Answer: d
Explanation: The TRIGGER pin is to be kept HIGH for a period of 10 microseconds
meanwhile the ECHO pin is HIGH for the time period it takes for the sent Ultrasonic
wave to return to the sensor. Thus, the entire detection is digital.
49. What will happen if we supply a voltage of 25V to the Vcc of the Nokia 5110
GDM?
a) Module will function normally
b) Damage is caused
c) Module will shut down
d) Module will not respond for the time the voltage is applied
View Answer
Answer: b
Explanation: The Nokia 5110 Graphical Display Modules are mostly built to work on
a voltage range of approximately 3.3V to 5V. Any voltage lower than that and the
sensor will not be able to power on, but however any voltage significantly above that
and the sensor may suffer permanent damage.

50. Which port on any Arduino board should be connected to the Key Port on the
Adafruit FONA 3G+GPS Breakout?
a) Gnd
b) Any Analog Pin
c) Vcc
d) Any Digital Pin
View Answer
Answer: a
Explanation: The Adafruit FONA 3G+GPS Breakout’s Key pin should be always
connected to the Gnd Pin on any Arduino Board. This pin provides the function of
the power on/off indicator. When you would like to shutdown the board, connect the
pin to the Gnd of the Arduino Board for about 3 to 5 seconds. However for prolonged
use usage of the Adafruit FONA 3G+GPS Breakout one needs to permanently
connect this pin to the Gnd of the Arduino.

51. What is the way of throwing an error using preprocessing directives to the
Arduino Compiler and forcing it to stop compilation?
a) #warning
b) #stop
c) #cut
d) #error
View Answer
Answer: d
Explanation: The #error directive first throws an error to the Arduino IDE which is
then displayed and then the compilation process is stopped prematurely. This is
used to enable the user to stop the compilation process programmatically if some
criteria or condition is not met before he or she can allow the program to start
running.

You might also like