Amperes Container 1 5 m 0 m Container 1 5 m 0 m Container 1 Container 2 0 m 4 m 0 m Container 1 Container 2 1 m 0 m 0 m Container 1 Container 2 5 m 0 m 5 V 0 V ID: 935162
Download Presentation The PPT/PDF document "What is Voltage and" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Slide2What
is
Voltage
and Amperes??
Slide3Container 1
Slide45 m0 m
Container
1
Slide55 m0 m
Container
1
Container
2
0 m
Slide64 m0 m
Container
1
Container
2
1 m
0 m
Slide70 m
Container
1
Container
2
5 m0 m
Slide85 V0 V
Container
1
Slide95 V
0 V
Container
1
Container
2
0 V
Slide100 V
Container
1
Container
2
5 V0 V
Slide11How
to
turn
on an
LED?Current flows always from
the
positive pin to
the
negative
Slide12Components
Power
supply
ResistanceLED Jumpers
Slide13Breadboard
Perfect
for
prototyping
Fast
connection
, no
need
to
solder
every
connection
Reusable
The
lines
that
are
shown
in
the
image
are
connected
Slide14Breadboard
River
1
River
2
Wall
Slide15Breadboard
River
1
Wall
River
2
Slide16Assemble
our
first circuit
Slide17Assemble
our
first circuit
5V
River
Slide18Assemble
our
first circuit
5V
River
Resistance
River
Slide19Assemble
our
first circuit
5V
River
Resistance
River
Leg
1
Leg
2
Slide20Assemble
our
first circuit
5V
River
Resistance
River
Leg
1
Leg
1
Leg
2
Slide21Assemble
our
first circuit
5V
River
Resistance
River
Leg
1
Leg
2
Leg
2
Leg
1
Slide22Assemble
our
first
circuit
5V
River
Resistance
River
Leg
1
Leg
2
LED
River
Leg
2
Leg
1
Slide23Assemble
our
first circuit
5V
River
Resistance
River
Leg
1
Leg
2
LED
River
Leg
3
Leg
2
Leg
3
Leg
1
Slide24Assemble
our
first circuit
5V
River
Resistance
River
Leg
1
Leg
2
LED
River
Leg
3
Leg
2
Leg
4
Leg
4
Leg
1
Leg
3
Slide25Assemble
our
first circuit
5V
River
Resistance
River
Leg
1
Leg
2
LED
River
Leg
3
GND
River
Leg
2
Leg
4
Leg
4
Leg
1
Leg
3
Slide26Assemble
our
first circuit
5V
River
Resistance
River
LED
River
Leg
3
GND
River
Leg
2
Leg
4
Leg
5
Leg
6
Leg
5
Leg
1
Slide27Assemble
our
first circuit
5V
River
Resistance
River
LED
River
Leg
3
GND
River
Leg
2
Leg
4
Leg
5
Leg
6
Leg
5
Leg
1
Leg
6
Slide28Where
is
the power
supply?To power up the teensy just connect it to your laptop
using USB port
Very
important
:
DOUBLE CHECK your circuit before connecting the teensy
to your laptop. Invalid connection may damage the
microcontroller or your USB port.
Slide29Where
is
the power
supply?
5V
River
GND
River
Slide30Where
is
the power
supply?
5V
River
GND
River
Slide31Challenge
nº1
You
have
15 min!!
5 V
GND
Slide32Button
Slide33Challenge
nº2
You
have
5 min!!
5 V
GND
Slide34What
is
a
microcontroller?
Small computer Able
to do
tasks
like
turn
on
/
off
a LED,
rotate
a motor,
read
values
from
different
sensors
, etc…
It’s
the
brain
off
the
project
What
is
a
microcontroller?
Small
computer
Able
to do
tasks
like
turn
on
/
off
a LED,
rotate
a motor,
read
values
from
different
sensors
, etc…
It’s
the
brain
off
the
project
What
is
a
microcontroller?
Small
computer
Able
to do
tasks
like
turn
on
/
off
a LED,
rotate
a motor,
read
values
from
different
sensors
, etc…
It’s
the
brain
off
the
project
What
is
a
microcontroller?
Digital Pins
The
teensy
2.0
has
11 digital pins,
and
they
can
be
used
to
send
or
read
signals
They
only
have
2
states
:
1 (
High
state
)
0 (
Low
state
)
Like
the
push
button
,
when
it’s
activated
the
current
will
flow
from
the
pin to
the
component
that
is
connected
to
it
Install
the
software
Go
to this link : https://www.arduino.cc/en/main/software
Windows
Mac
Linux
Slide39Install
the
software
Download
it
Slide40Install
teensy
driver
Go
to this link : https://www.pjrc.com/teensy/td_download.html
Windows
Mac
Linux
Slide41Arduino
IDE
Slide42Arduino
IDE
1
2
3
Slide43Arduino
IDE
1
2
3
Slide44Arduino
IDE
Change
13 to 11
Slide45Arduino
IDE
Click
on
Verify
Slide46Arduino
IDE
Slide47Arduino
IDE
Click
on
upload
Slide48Arduino
IDE
Slide49Challenge
nº3
MAGIC
Slide50Arduino
Code
The
code is always written and
read
from
the
top to
bottom
,
and
left
to
right
A
command
as
always
to
end
with
a “ ; ”
except
when
it’s
a
function
or
a
condiction
It’s
good
practice
to
comment
our
code
, to do
that
just
type
“ // ”
and
the
rest
of
the
text
after
is
just
comments
Slide51Arduino
Code
Variables are used to store information to be used in a computer program
They also provide a way of labeling data with a descriptive name
Variables are containers that hold information
Slide52Arduino
Code
Types
of variables
int
char
Slide53Arduino
Code
Types
of variables
int
char
int
Number
char
Name
Slide54Arduino
Code
Types
of variables
int
char
int
Number
char
Name
int
Number
= 15;
Char
Name
= ‘a’;
Slide55Arduino
Code
Functions allows a programmer to create modular pieces of code
Slide56Arduino
Code
Functions allows a programmer to create modular pieces of code
Name
of
our
function
Starts with open
curly bracket
Ends with close
curly bracket
Slide57Arduino
Code
Functions allows a programmer to create modular pieces of code
Everything
between
the
curly
brackets
is
what
happens
in
our
function
Name
of
our
function
Starts with open
curly bracket
Ends with close
curly bracket
Slide58Arduino
Code
Functions allows a programmer to create modular pieces of code
Used
to
state
what
we
will
be
using
in
our
project
Number
of
LED,
sensors
, etc…
Slide59Arduino
Code
Functions allows a programmer to create modular pieces of code
Where
the
action
begins
Happens
in a
infinit
loop
Used
to
state
what
we
will
be
using
in
our
project
Number
of
LED,
sensors
, etc…
Slide60Arduino
Code
Arduino
has built-in functions that can be use for
different
situations
Slide61Arduino
Code
Arduino
has built-in functions that can be use for
different
situations
When
we
want
to use a LED:
Function to configures the
specified pin to behave either
as an input or an output
13
Slide62Arduino
Code
Arduino
has built-in functions that can be use for
different
situations
When
we
want
to use a LED:
Function to configures the
specified pin to behave either
as an input or an output
Number
of
the
pin
13
Slide63Arduino
Code
Arduino
has built-in functions that can be use for
different
situations
When
we
want
to use a LED:
Function to configures the
specified pin to behave either
as an input or an output
Number
of
the
pin
Direction
of
the
signal
13
Slide64Arduino
Code
Arduino
has built-in functions that can be use for
different
situations
When
we
want
to use a LED:
Function to send the signal
Number
of
the
pin
Value
of
the
signal
13
Slide65Arduino
Code
11
Slide66Arduino
Code
11
Slide67Arduino
Code
Slide68Arduino
Code
Global
variable
When
a
variable
it’s
declare
outside
of
the
functions
it
can
be
used
by
any
of
them
Local
variable
When
a
variable
it’s
define in a
function
,
it
can
only
be
used
inside
the
function
Slide69Challenge
nº 4
Send
a S.O.S.
signal
from arduino with the built-in LED
You
have
15 minutes!!
Slide70Using
teensy
to
read a signal
Now you learn how
to use
the
teensy
to
read
a
signal
To do
that
,
we
will
be
using
a
push
botton
to
send
the
signal
to
the
teensy
Depending
on
the
state
off
the
pin
that
we
will
read
,
the
LED
should
be
on
or
off
Slide71Using
teensy
Use
the
PIN 0 of teensy to read a signal
Function to configures the
specified pin to behave either
as an input or an output
Number
of
the
pin
Direction
of
the
signal
0
INPUT
Function
that
returns
the
state
of
the
pin
PIN to
read
Slide72Using
teensy
If
condition is used to compare values and take
action
according
to
the
result
Our
condition
True
False
= to
assign
values
== to compare
values
Challenge
nº 5
Send
the S.O.S. only when you
press
the
push
button
5 V
PIN 0
GND
You
have
10 minutes!!
Slide74The
Big
Challenge
Create a game of your own using:
You
have
90 minutes!!