Lab 1 Flashcards

1
Q

How many different types on inputs/outputs does an Arduino Uno have?

A

3, digital, analog, serial

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

Digital Output

A

A digital output is a signal that can take two states: a high voltage state (typically 5 V or 3.3 V on the Arduino Uno) and a low-voltage state (0V) . This can be used to control relays and other switch devices as well as other low power devices, such as LEDs.

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

Analog input

A

An analog input reads continuous voltage levels between 0 V and 5 V. This is then represented as a 10 bit input signal with a value between zero and 1023 ( zero, one,…, 1023 represents values from 0 V to 5 V with increments of 5/1023 V). this is ideal for reading voltages across a sensor such as light dependent resistors

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

Serial input

A

A serial input allows the air to communicate with other devices, such as a computer. This can be useful for debugging and displaying data data. In our application, we will use this to form and understanding of what is happening by printing statements and data like sensor values from the Arduino.

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

Light dependent resistor (LDR)

A

A resistor is an electrical circuit component that limits the current, passing through a wire, analogist to a restriction in a water pipe. An LDR is a variable resistor whose value resistance increases/decreases, depending on the intensity of the light shining on its surface. They Arduino measures the voltage across the LDR, which is related to the resistance of the LDR (which is related to the light intensity) according to the following equation:
V(ldr)= R(ldr)/(R+R(ldr))V(cc)

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

Light emitting diode LED

A

An LED is a component that lights up when current passes through it. LEDs range widely and bright, power rating, and color and subsequently used in various applications, ranging from room lights to largest scale displays. And LED brightness can be controlled by changing its voltage or current. And they are, we know this can be realized using pulse with modulation, PWM

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

Pulse with modulation PWM

A

PWM is a technique used to simulate varying voltage levels. This is done by changing the value of an output pin from 0 V to 55 V over a given duration of time so that the average voltage over that duration is the desired value we want to achieve.

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

Pin

A

Is any digital or analog pin number labeled on the board?

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

Mode

A

Can be either input or output

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

pinMode(pin,mode)

A

This is used to set up a pin as either input, output, or input_pullup

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

Serial.begin(baudRate)

A

It is used to initialize serial communication between the computer and the are doing up. BaudRate can take values from 9600, 14,400, 19,200, etc.
The Baudrate is the right at which this communication takes place in bits per second. It can be 9600 bits per second for lower speed Arduino projects. But we can change it to 14,400 bits per second and even up to 57,600 bits per second if we need to increase the rate to add which we read and process data. The downside of using a higher rate is that this will use more energy and resources, which the processor could otherwise use to run more complex computations.

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

AnalogRead(pin)

A

Dysfunction reads an input from an analog input pin. The read value is a 10 bit binary number. It is a value that ranges from 0 to 1023. Then returns the value read.
Pin is one of the analog input pins.

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

Serial.print(data)

A

Dysfunction is used to send data to the serial port to visualize the given data on the computer. Data can be filled with variables, strengths, and many other data types. This is not like the ‘cout’ statement. Strings are in quotation marks, while variables and numbers are not. This function uses spaces and commas as the limit, which indicate the end of one data to be plotted, and the start of a new one. A good style is to print a string to be used as a legend in the plot, followed by the value to be printed, followed by, such as.
Serial.print(“input_value:”);
Serial.print(variable_name);
Serial.print(“,”);

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

Serial.println(data)

A

Is the same as serial.print but adds a new line at the end of the data. Data can be filled with variables, strings, and many other data types.

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

analogWrite(pin,data)

A

Dysfunction is used to send a PWM signal to a pin. Pin is any PWM capable digital pin on the Arduino. Data is an integer between zero and 255.

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

Delay(duration)

A

This function pauses the program for the amount of time specified. Duration is an integral value representing the number of milliseconds delay the program.