Arduino Flashcards

1
Q

What is Arduino Uno?

A

The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital input/output pins,
6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, memory and a reset
button. It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with a AC-to-DC adapter or battery to get started. The microcontroller is
programmed using the Arduino programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the advantages of arduino?

A
  1. Inexpensive
  2. Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux
    operating systems.
  3. Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for
    beginners, yet flexible enough for advanced users.
  4. Open source and extensible software - The Arduino software is published as open source tools,
    available for extension by experienced programmers.
  5. Open source and extensible hardware - experienced circuit designers can make their own version of the
    module, extending it and improving it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the features of Arduino?

A

● It is very convenient to manage power inside it and it has a feature of built-in voltage regulation.
This can also be powered directly off a USB port without any external power. You can connect an
external power source of upto 12v and this regulates it to both 5v and 3.3v.

● 13 digital pins and 6 analog pins.

● It has 32 KB of flash memory for storing your code.

● An on-board LED is attached to digital pin 13 to make the debugging of code easier.

● It has a button to reset the program on the chip.

● It is a 16 MHz clock which is fast enough for most applications and does not speed up the
microcontroller.

● This has an ICSP (In-Circuit Serial Programming) connector for bypassing the USB port and
interfacing the Arduino directly as a serial device. This port is necessary to re-bootload your chip
if it corrupts and can no longer be connected to your computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Arduino teminology

A

Sketch - A program you write to run on an Arduino board
Pin - An input or output connected to something
Digital - Value is either high or low
Analog - value ranges, usually from 0-225

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Programming:
Setup function

A

The setup() function is called when a sketch starts. Use it to initialize the
variables (not declaration), pin modes, start using libraries, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Programming:
If statement

A

It takes an expression in parenthesis and
a statement or block of statements. If the
expression is true then the statement or
block of statements gets executed
otherwise these statements are skipped.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Programming:
Else statement

A

An if statement can be followed by an
optional else statement, which executes
when the expression is false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Programming:
If, else if, else

A

The if statement can be followed by an
optional else if…else statement, which is
very useful to test various conditions
using single if…else if statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Programming:
Switch - case statement

A

Similar to the if statements, switch…case
controls the flow of programs by allowing
the programmers to specify different
codes that should be executed in various
conditions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Programming:
Conditional operator (? and :)

A

The conditional operator ? : is the only
ternary operator in C.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Programming:
While loop

A

while loops will loop continuously, and infinitely,
until the expression inside the parenthesis, ()
becomes false. Something must change the
tested variable, or the while loop will never exit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Programming:
do…while loop

A

The do…while loop is similar to the while loop. In
the while loop, the loop-continuation condition is
tested at the beginning of the loop before
performed the body of the loop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Programming:
For loop

A

A for loop executes statements a predetermined
number of times. The control expression for the
loop is initialized, tested and manipulated entirely
within the for loop parentheses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Programming:
Nested Loop

A

You can use one loop inside another loop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Programming:
Infinite loop

A

It is the loop having no terminating condition, so
the loop becomes infinite.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Programming:
pinMode()

A

The pinMode() function is used to configure a specific pin to behave either as an
input or an output.
Syntax:
void setup ()
{ pinMode (pin , mode); }

17
Q

Coding:
digitalWrite()

A

The digitalWrite() function is used to write a HIGH or a LOW value to a digital pin.
Syntax:
digitalWrite (pin ,value)

18
Q

Coding:
digitalRead()

A

Reads the value from a specified digital pin, either HIGH or LOW
Syntax:
digitalRead(pin);

19
Q

Coding:
analogRead()

A

we can read the voltage applied to one of the pins. This function returns a number between 0 and 1023, which represents voltages between 0 and 5 volts.
Syntax:
analogRead(analogPin);

20
Q

Coding:
analogWrite()

A

analogWrite( ) function - Writes an analog value (between 0 and 255) to a pin.
Syntax
analogWrite(Pin, value)

21
Q

What is Serial Communication?

A

serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus

22
Q

What is Serial Monitor?

A

The serial monitor is the ‘tether’ between the computer and your Arduino , it lets you send and receive
text messages, handy for debugging and also controlling the Arduino from a keyboard

23
Q

What is Serial Monitor?

A

The serial monitor is the ‘tether’ between the computer and your Arduino , it lets you send and receive
text messages, handy for debugging and also controlling the Arduino from a keyboard

24
Q

What is Baud Rate?

A

The baud rate is the rate at which information is transferred in a communication channel.

25
Q

Coding - Serial communication functions:
print()

A

Prints data to the serial port as human-readable ASCII text.
Syntax:
Serial.print(val, format)
Val is the value to print

26
Q

Coding - Serial communication functions:
println()

A

Prints data to the serial port as human-readable ASCII text followed by a carriage return character ( ‘\r’) and a newline character (‘\n’).
Syntax:
Serial.println(val, format)

27
Q

Coding - Serial communication functions:
begin()

A

Sets the data rate in bits per second (baud)
for serial data transmission.
Syntax:
Serial.begin(speed, config)

speed is the bits per second

28
Q

Coding - Serial communication functions:
end()

A

Disables serial communication,To re-enable
serial communication, call Serial.begin().
Syntax:
Serial.end()

29
Q

What is an array?

A

An array is a collection of variables that are accessed with an index number

30
Q

What is a PIR sensor? What are its advantages?

A

Passive infrared sensors allow you to sense motion. They are used to detect whether a human has moved in or out of the sensor’s range.
Advatages:
● Small in size
● Wide lens range
● Easy to interface
● Inexpensive
● Low-power
● Easy to use
● Do not wear out

31
Q

What is a humidity sensor?

A

Senses and measures both moisture and
air temperature. This is an advantage.

32
Q

What is a photoresistor?

A

A photoresistor (or light-dependent resistor, LDR, or photoconductivecell) is a light-controlled variable resistor. The resistance of a photoresistor decreases with increasing incident light intensity. A photoresistor can be applied in light-sensitive detector circuits, and light- and dark-activated switching circuits.

33
Q

What is a accelerometer?

A

An accelerometer is a device that measures proper acceleration. Proper acceleration is the acceleration (or rate of change of velocity) of a body in its own instantaneous rest frame. Accelerometers have multiple applications in industry and science. Highly sensitive accelerometers are components of inertial navigation systems for aircraft and missiles. Accelerometers are used to detect and monitor vibration in rotating machinery. Accelerometers are used in tablet computers and digital cameras so that images on screens are always displayed upright. Accelerometers are used in drones for flight stabilisation.