🗊Презентация Simple Digital and Analog Inputs

Категория: Технология
Нажмите для полного просмотра!
Simple Digital and Analog Inputs, слайд №1Simple Digital and Analog Inputs, слайд №2Simple Digital and Analog Inputs, слайд №3Simple Digital and Analog Inputs, слайд №4Simple Digital and Analog Inputs, слайд №5Simple Digital and Analog Inputs, слайд №6Simple Digital and Analog Inputs, слайд №7Simple Digital and Analog Inputs, слайд №8Simple Digital and Analog Inputs, слайд №9Simple Digital and Analog Inputs, слайд №10Simple Digital and Analog Inputs, слайд №11Simple Digital and Analog Inputs, слайд №12Simple Digital and Analog Inputs, слайд №13Simple Digital and Analog Inputs, слайд №14Simple Digital and Analog Inputs, слайд №15Simple Digital and Analog Inputs, слайд №16Simple Digital and Analog Inputs, слайд №17Simple Digital and Analog Inputs, слайд №18Simple Digital and Analog Inputs, слайд №19Simple Digital and Analog Inputs, слайд №20Simple Digital and Analog Inputs, слайд №21Simple Digital and Analog Inputs, слайд №22Simple Digital and Analog Inputs, слайд №23Simple Digital and Analog Inputs, слайд №24Simple Digital and Analog Inputs, слайд №25Simple Digital and Analog Inputs, слайд №26Simple Digital and Analog Inputs, слайд №27Simple Digital and Analog Inputs, слайд №28Simple Digital and Analog Inputs, слайд №29Simple Digital and Analog Inputs, слайд №30

Вы можете ознакомиться и скачать презентацию на тему Simple Digital and Analog Inputs. Доклад-сообщение содержит 30 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1





IMPLEMENTING IOE
Assist. Prof. Rassim Suliyev - SDU 2017
Описание слайда:
IMPLEMENTING IOE Assist. Prof. Rassim Suliyev - SDU 2017

Слайд 2





Simple Digital and Analog Inputs
The Arduino’s ability to sense digital and analog inputs allows it to respond to you and to the world around you
Описание слайда:
Simple Digital and Analog Inputs The Arduino’s ability to sense digital and analog inputs allows it to respond to you and to the world around you

Слайд 3





Simple Digital and Analog Inputs
digitalRead(pin) - tells your sketch if a voltage on a pin is HIGH (5 volts) or LOW (0 volts)
pinMode(pin, INPUT) – configure pin as an INPUT
14 digital pins (numbered 0 to 13)
Pins 0 and 1 (marked RX and TX) are used for the USB serial connection
Need more? 
Analog pins 0 through 5 can be used as digital pins 14 through 19
Описание слайда:
Simple Digital and Analog Inputs digitalRead(pin) - tells your sketch if a voltage on a pin is HIGH (5 volts) or LOW (0 volts) pinMode(pin, INPUT) – configure pin as an INPUT 14 digital pins (numbered 0 to 13) Pins 0 and 1 (marked RX and TX) are used for the USB serial connection Need more? Analog pins 0 through 5 can be used as digital pins 14 through 19

Слайд 4





Simple Digital and Analog Inputs
Still need more?
Analog pins 0 through 15 are digital pin numbers 54 through 69
Описание слайда:
Simple Digital and Analog Inputs Still need more? Analog pins 0 through 15 are digital pin numbers 54 through 69

Слайд 5





Sensors & Inputs
Many sensors are variations on switches
Switches make or break a connection
Описание слайда:
Sensors & Inputs Many sensors are variations on switches Switches make or break a connection

Слайд 6





Many Kinds of Switches
Tilt sensor has a little ball inside
Magnetic switches are delicate
The hex switch is actually many switches in one, and outputs 4 signals
Описание слайда:
Many Kinds of Switches Tilt sensor has a little ball inside Magnetic switches are delicate The hex switch is actually many switches in one, and outputs 4 signals

Слайд 7





Digital Input
Switches make or break a connection
But Arduino wants to see a voltage
Specifically, a “HIGH” (5 volts) or a “LOW” (0 volts)
How do you go from make/break to HIGH/LOW?
Описание слайда:
Digital Input Switches make or break a connection But Arduino wants to see a voltage Specifically, a “HIGH” (5 volts) or a “LOW” (0 volts) How do you go from make/break to HIGH/LOW?

Слайд 8





From Switch to HIGH / LOW
With no connection, digital inputs “float” between 0 & 5 volts (LOW & HIGH)
Resistor “pulls” input to ground (0 volts)
Pressing switch “pushes” input to 5 volts
Press is HIGH
Not pressed is LOW
Pull-down resistor
Описание слайда:
From Switch to HIGH / LOW With no connection, digital inputs “float” between 0 & 5 volts (LOW & HIGH) Resistor “pulls” input to ground (0 volts) Pressing switch “pushes” input to 5 volts Press is HIGH Not pressed is LOW Pull-down resistor

Слайд 9





Pull-up and Pull-down
pull-up resistors – pull the voltage up to the 5V line that the resistor is connected to
pull-down resistors – pull the voltage down to 0 volts
Although 10K ohms is a commonly used value, anything between 4.7K and 20K or more will work
Описание слайда:
Pull-up and Pull-down pull-up resistors – pull the voltage up to the 5V line that the resistor is connected to pull-down resistors – pull the voltage down to 0 volts Although 10K ohms is a commonly used value, anything between 4.7K and 20K or more will work

Слайд 10





Control the Blinking
Connect a button to pin 2 with a pull-down resistor
Turn on LED if button pressed and OFF if released
Описание слайда:
Control the Blinking Connect a button to pin 2 with a pull-down resistor Turn on LED if button pressed and OFF if released

Слайд 11





Control the Blinking
Описание слайда:
Control the Blinking

Слайд 12





Let’s Wire It Up
Going from schematic to physical circuit.
Описание слайда:
Let’s Wire It Up Going from schematic to physical circuit.

Слайд 13





Solderless Breadboards
Описание слайда:
Solderless Breadboards

Слайд 14





Useful Tools
Описание слайда:
Useful Tools

Слайд 15





Making Jumper Wires
Описание слайда:
Making Jumper Wires

Слайд 16





Using Solderless Breadboards
Using needle nose pliers can help push wires & components into holes
Описание слайда:
Using Solderless Breadboards Using needle nose pliers can help push wires & components into holes

Слайд 17





All Wired Up
Описание слайда:
All Wired Up

Слайд 18





Using Switches to Make Decisions
Often you’ll want to choose between actions, based on a data obtained from switch-like sensor
E.g. “If motion is detected, turn on the lights”
E.g. “If flower pot soil is dry, turn on sprinklers”
Define actions, choose them from sensor inputs
Let’s try that with the actions we currently know
E.g.: If button is pressed send “Hello!” to serial port, and if released send “Goodbye!”
Описание слайда:
Using Switches to Make Decisions Often you’ll want to choose between actions, based on a data obtained from switch-like sensor E.g. “If motion is detected, turn on the lights” E.g. “If flower pot soil is dry, turn on sprinklers” Define actions, choose them from sensor inputs Let’s try that with the actions we currently know E.g.: If button is pressed send “Hello!” to serial port, and if released send “Goodbye!”

Слайд 19





Control the Blinking (pull-up)
Описание слайда:
Control the Blinking (pull-up)

Слайд 20





Switch Without External Resistors
Arduino has internal pull-up resistors that can be enabled by writing a HIGH value to a pin that is in INPUT mode
Описание слайда:
Switch Without External Resistors Arduino has internal pull-up resistors that can be enabled by writing a HIGH value to a pin that is in INPUT mode

Слайд 21





Reliably Detecting the Switch State
contact bounce produces spurious signals at the moment the switch contacts close or open
avoid false readings due to contact bounce - debouncing
Описание слайда:
Reliably Detecting the Switch State contact bounce produces spurious signals at the moment the switch contacts close or open avoid false readings due to contact bounce - debouncing

Слайд 22





Analog Input
To computers, analog is chunky
Описание слайда:
Analog Input To computers, analog is chunky

Слайд 23





Analog Input
Many states, not just two (HIGH/LOW)
Number of states (or values, or “bins”) is resolution
Common computer resolutions:
8-bit = 256 values
16-bit = 65,536 values
32-bit = 4,294,967,296 values
Описание слайда:
Analog Input Many states, not just two (HIGH/LOW) Number of states (or values, or “bins”) is resolution Common computer resolutions: 8-bit = 256 values 16-bit = 65,536 values 32-bit = 4,294,967,296 values

Слайд 24





Analog Input
Arduino (ATmega168) has six ADC inputs
(ADC = Analog to Digital Converter)
Reads voltage between 0 to 5 volts
Resolution is 10-bit (1024 values)
In other words, 5/1024 = 4.8 mV smallest voltage change you can measure
Описание слайда:
Analog Input Arduino (ATmega168) has six ADC inputs (ADC = Analog to Digital Converter) Reads voltage between 0 to 5 volts Resolution is 10-bit (1024 values) In other words, 5/1024 = 4.8 mV smallest voltage change you can measure

Слайд 25





Analog Input
Sure sure, but how to make a varying voltage?
With a potentiometer. (pot)
Описание слайда:
Analog Input Sure sure, but how to make a varying voltage? With a potentiometer. (pot)

Слайд 26





Potentiometers
Moving the knob is like moving where the arrow taps the voltage on the resistor
When a resistor goes across a voltage difference, like +5V to Gnd, the voltage measured at any point along a resistor’s length is proportional to the distance from one side.
Описание слайда:
Potentiometers Moving the knob is like moving where the arrow taps the voltage on the resistor When a resistor goes across a voltage difference, like +5V to Gnd, the voltage measured at any point along a resistor’s length is proportional to the distance from one side.

Слайд 27





What good are pots at?
Anytime you need a ranged input
Measure rotational position
steering wheel, robotic joint, etc.
But more importantly for us, potentiometers are a good example of a resistive sensor
Описание слайда:
What good are pots at? Anytime you need a ranged input Measure rotational position steering wheel, robotic joint, etc. But more importantly for us, potentiometers are a good example of a resistive sensor

Слайд 28





Arduino Analog Input
Plug pot directly into breadboard
Two “legs” plug into +5V & Gnd (red + & blue -) buses
Middle “post” plugs into a row (row 7 here)
Run a wire from that row to Analog In 2
Описание слайда:
Arduino Analog Input Plug pot directly into breadboard Two “legs” plug into +5V & Gnd (red + & blue -) buses Middle “post” plugs into a row (row 7 here) Run a wire from that row to Analog In 2

Слайд 29





Pot & LED Circuit
Описание слайда:
Pot & LED Circuit

Слайд 30





Pot Blink Rate
Описание слайда:
Pot Blink Rate



Похожие презентации
Mypresentation.ru
Загрузить презентацию