Arduino
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.
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.
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.
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.
#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?
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.
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.
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.
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.
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.
1. void setup() {
2. Seria.begin(9600);
3. }
4. void setup() {
5. Serial.write(40);
6. }
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.
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.