Arduino Programming 1 Flashcards

1
Q

A program you write to run on an Arduino Board

A

Sketch

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

An input or output connected to something e.g. output to an LED, input for a knob.

A

pin

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

Value is either HIGH or LOW.
(a.k.a. on/off, one/zero)
e.g. switch state.

A

digital

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

Value ranges, usually from 0-255.
e.g. LED brightness, motor speed, etc.

A

analog

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

Is a signal / information
going into the board.

A

Inputs

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

Is any signal exiting the
board

A

Output

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

Almost all systems that use physical computing will have some form of output.
True/False

A

True

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

5 Examples of Inputs:

A

Buttons Switches,
Light Sensors,
Flex Sensors,
Humidity Sensors,
Temperature Sensors

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

6 Examples of Outputs:

A

LEDs,
DC motor,
servo motor,
piezo buzzer,
relay,
RGB LED

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

Are digital devices – ON or OFF.
Also called – discrete

A

Microcontrollers

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

Are anything that can be a full range of values

A

Analog signals

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

Sets pin to either INPUT or OUTPUT

A

pinMode(pin, mode)

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

Reads HIGH or LOW from a pin

A

digitalRead(pin)

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

Writes HIGH or LOW to a pin

A

digitalWrite(pin, value)

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

Pauses for a few milliseconds

A

delay(ms)

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

Pauses for a few microseconds

A

delayMicroseconds(us)

17
Q

What are two basic sections that Arduino programs run on

A

void setup() {
//setup motors, sensors etc
}
void loop() {
// get information from sensors
// send commands to motors
}

18
Q

Is used for assigning input and outputs (Examples: motors, LED’s, sensors etc) to ports on the Arduino. It also specifies whether the device is OUTPUT or INPUT

A

setup()

19
Q

A pin on arduino can be set as input or output by using

A

pinMode function

20
Q

Makes the output voltage on pin 13 , 0V

A

digitalWrite(13, LOW);

21
Q

Makes the output voltage on pin 13 , 5V

A

digitalWrite(13, HIGH);

22
Q

reads the value of pin 2 in buttonState

A

int buttonState = digitalRead(2);

23
Q

It is like “bucket”. It holds numbers or other values temporarily

A

Variables

24
Q

Are for you – the programmer and
your friends…or anyone else human that
might read your code.

A

Comments

25
Q

Is used for single line comments

A

//

26
Q

Is used for multi-line
comments

A

/* */

27
Q

“Hello World” of Physical Computing

A

Blink

28
Q

Are sensor that are more straight forward than Analog. Signal is always either HIGH (On) or LOW (Off)

A

Digital sensors