lec 2 Flashcards

1
Q

what does a pull up/pull down resistor do

A

ensure the input voltage is maintained at +5 volts or ground

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

WHEN/ what device would a pull up or down resistor be used

A

when using digital pin as input in Arduino

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

WHY would you use a pull up or down resistor

A

voltage level appearing at that input will be unpredictable

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

what instruction would you issue when using digital line

A

pinMode (pin_number , INPUT);

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

what is the pull up pinmode() instruction

A

pinMode (pin_number , INPUT_PULLUP);

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

what is the advantage of having 3 dedicated ports on Arduino, and what are these ports called

A

memory, speed and control

these ports are called: port B, port C and port D

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

what Adrunio pins does Port B use?

A

digital pins D8 to pin D13

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

what Adruino pins does Port C use?

A

uses analogue pins A0 to A5

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

what Adruino pins does Port D use?

A

uses digital pins D0 to pin D7

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

In any programming, or scripting language functions are an extremely powerful feature with
a significant number of benefits. what are they? (6)

A

 break down program into modules, creating a structured program.
 Reduce size of a program by eliminating duplication of code.
 Make debugging easier.
 Simplify the task of updating/modifying a program.
 Make a program easier to read.
 Permit the use of local variables

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

what must all sketches have built in?

A

function if setup() and loop()

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

what are the positioning of components in a sketch (5)

A
void setup() {
}
void loop() {
}
function 1() {
}
function 2() {
}
function n() {
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how are functions outside setup() and loop() presented in sketch (4)

A
appropriate function name 
preceded by the data type
function will return.
then set of parentheses.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is a parenthesis

A

used to pass one,

or more bits of information to the inner workings of the function in the form of variables.

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