Exam 1 Physical Computing

¡Supera tus tareas y exámenes ahora con Quizwiz!

The internal pull-up or pull-down resistor of a GPIO pin connected to a pushbutton switch is enabled to address the issue of____________

The floating voltage level at the GPIO pin

What does the input function return?

The reference to the string.

What is an interpreter in python?

The translation of single statement of source program into machine code is done by the language processor and executes it immediately before moving on to the next line is called an interpreter.

Process of setting up output pins?

- import RPi.GPIO as GPIO - GPIO.setmode(GPIO.BCM) - GPIO.setup(led,GPIO.out)

What is the speed of the Raspberry Pi 4 B processor?

1.5 GHz

What do humans emit IR waves at?

10-12 microns

Where is infrared wavelength

10^-6 to 10^-3

What is the Forward Bias Voltage of Red and Green LEDs?

2V

Operators like "and" "or" and "not" or are referred to as what?

Logical Operators

How is a pull up connection setup?

One end of the button is connected to the GPIO pin and the other goes to the ground.

A 220 Ω resistor is connected in series with a GPIO pin, and a LED to _________

Reduce the 3.3 V output from the GPIO pin to 2.0 V across the LED

What is the classification of Python and C++ Programming languages?

Scripting and compiled languages respectively

What is Pulse Width Modulation?

a method of reducing the average power delivered by an electrical signal, by effectively chopping it up into discrete parts.

A thread object represents an activity that is run in ________

a separate thread of execution within the same process

What is the Try Block

indicates the code which is to be monitored for exceptions, listed in the except expressions

What two components do the KY-033 & TCRT5000 consist of?

infrared Transmitter and receiver

What does pre-defined mean?

it is build into the Python environment and is understood by the Python interpreter

For the setup output function, How many arguments does it require? and what are those arguments?

- 2 - the specific GPIO pin and GPIO.OUT

Max input or output voltage of GPIO? Max output current? The total current output of all pins?

- 3.3 V - 16 mA - 100 mA

What is an LED? what is the current?

- Light Emitting Diode - 6 mA

What is it known as when these softwares cause an interrupt?

An event

What does IPYNB stand for?

Interactive Python Notebook

Are Scripting languages are faster than compiled languages?

No

What can be said about using pins in the same channel for PWM?

It won't work, pins must be on different PWM channels.

When was the Raspberry Pi 4 B introduced?

June 2019

What is Physical computing?

Physical Computing is the creation of hardware devices that can sense and act in the real world.

What does (PIR) Sensor stand for and what does it do?

Pyroelectricity Sensor: converts IR readings into electrical signal

What is following all python standards called?

Pythonic

What is The transition from low to high state voltage known as?

Raising edge

What is operating system in RPi?

Raspbian: bullseye version

How is a pull down connection setup?

One end of the button to the pulldown GPIO pin, and the other to the 3.3V

The output voltage of a GPIO pin can be varied continuously between 0 to 3.3V using ________

PWM or Pulse Width Modulation

What is a pull down GPIO pin?

Raspberry Pi GPIO Pins internally are connected with either pull-down or pull-up resistors. GPIO27 is internally connected with a pull-down resistor and therefore GPIO27 will be in the False State until the button is pressed and toggles to True State.

For the setup input function, How many arguments does it require? and what are those arguments?

- 3 - the specific GPIO pin, GPIO.IN, and GPIO.PUD_DOWN or GPIO.PUD_UP

What is the Voltage, Current, and detection distance of KY-033

- 3.3 to 5V - 20 mA or greater - 2 to 40 cm

Difference between Compiler and Interpreter?

- Compiler converts entire source code and takes a while to do entire program but is overall faster, slower debugging. - Interpreter runs line by line, takes less to analyze but overall execution is slower, faster debugging.

How do you turn an LED on and off?

- GPIO.output(led,True) - GPIO.output(led,False)

What are the four GPIO pins that are dedicated to PWM?

- GPIO12 and GPIO18: Channel 0 - GPIO13 and GPIO19: Channel 1

What does GPIO stand for? its purpose? and how many pins it has?

- General Purpose Input/Output interface - provides a direct access to the Processor (Broadcom chip) on the Raspberry Pi to control devices - 40 pins

What is the structure of a function?

- Header: Begins with the keyword 'def' followed by the function name and a list of parameters, and ends with a colon(:) - Body: indented or tabbed sets of Python statements below the header. - Optional Descriptive String: describes the purpose of the function and can be accessed using the help() function - An optional return statement with a list of return values

What are two ways to generate PWM with raspberry pi?

- Through Hardware - Through Software

What adjustments can you make and what is the power pin and output pin requirements?

- Time Delay(5s to 5 min) - Sensitivity adjust(3m to 7m) - Power pin needs 5V - Output pin needs 3.3V

What are types of data?

- strings - character - numbers - Boolean

What happens when the infrared light is reflected at the minimum level? What happens when the IR light is at max level

-It has encountered a black surface. -It causes the output signal to go high

What happens when the infrared light is reflected at the maximum level? What happens when the IR light is at max level

-It has encountered a white surface. -It causes the output signal to go low

A push button switch connected correctly to the GPIO pin with an internal pull down resistor will transit from _______ to _______ state when the button is pressed

-Low -High

How long does the pir go down for no matter what?

3 seconds

What is the Forward Bias Voltage of Blue and White LEDs?

3.0 to 3.5 V

The output voltage of GPIO pins on a raspberry pi at an instance of time can only be ______ or ______

3.3 or 0 V

How many cores are in the Raspberry Pi 4 CPU?

4

A LED is turned on for ton = 5 secs and turned off for toff = 2 secs continuously. The LED is blinking with a period of_______

7 sec

What is a string?

A string is a series, or sequence of characters in order

What is IIOT?

IOT on the industrial level

What is a pull UP GPIO pin?

Until the Pushbutton switch is pressed, the GPIO Pin 5 is connected to 3.3 V through an internal pull-up resistor and the GPIO Pin 5 will be in the True State until the button is pressed. On pressing the button, the GPIO 5 will be connected to the GND and toggles to the False State.

What is a variable?

a named area in the computers memory that can be used to hold things referred to as data

What is IOT?

a system of interrelated objects that are provided with unique identifiers (UIDs) and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction.

What are the parts inside the functions?

Arguments

What does BASH mean?

Bourne Again Shell

How does import work?

to import the desired module(s) using the import statement with the desired Module name

What are the two pin modes the GPIO interface of a raspberry pi can be accessed?

BCM and Board

How does Board mode work?

Board mode uses the board labeled pin NOT the GPIO labeled pin

What does BCM mean?

Broad com mode

How are strings defined?

By start and having '

How to adjust sensitivity?

Clockwise to decrease

How to adjust time delay?

Clockwise to increase

Operators like =,>,< are referred to as what?

Comparison operators

How to write functions without worrying about placement?

Def function_name(value=[ ], value2=[ ])

How do you read a resistor?

Digit Digit 10^digit tolerance

What is The transition from high to low state voltage known as?

Falling edge

When was the first generation Raspberry Pi introduced?

February 2012

How do you setup PWM?

GPIO.PWM(led,60) - where 60 is the frequency pwm.start(100) - where 100 is the duty cycle

How to add event

GPIO.add_event_detect(pin,GPIO.rising,callback=detecthuman)

What cleans up the GPIO pins?

GPIO.cleanup()

How do you set the pin access mode?

GPIO.setmode(GPIO.BCM)

What is the shutdown command in the terminal?

sudo shutdown -h -P now

What is a diode?

an electronic component that allows the flow of current in only one direction. flow of current from Anode to Cathode

A while loop is known as _________

an entry condition loop

What is character?

anything you can type on the keyboard in one keystroke

A hardware interrupt is handled by a special type of function known as_________

callback function

What is wavelength?

distance between crests

What is the except clause?

except clause is used to indicate what to do when certain exception/error.

How do you start a main function from a certain cell?

if __name__ == '__main__':

What are the three main types of condition statements?

if, else, elif

What does it mean by strings are immutable?

once a string has been created it cannot be changed

How do you change the duty cycle?

pwm.ChangeDutyCycle(dc)

How do you stop PWM?

pwm.stop()

What are the steps (in order) performed when running a scripting language?

read, interpreted, acted upon.

Traffic light consists of?

red, yellow, and green LEDs with three resistors connected in series with each LED


Conjuntos de estudio relacionados

Week 6 Employee Health and Safety

View Set

Microsoft PowerPoint Mastering for LinkedIn

View Set

Information Systems Management WGU

View Set