/
What   is   Voltage   and What   is   Voltage   and

What is Voltage and - PowerPoint Presentation

LoudAndProud
LoudAndProud . @LoudAndProud
Follow
344 views
Uploaded On 2022-08-04

What is Voltage and - PPT Presentation

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

river leg code arduino leg river arduino code led pin container circuit function assemble functions teensy resistance read signal

Share:

Link:

Embed:

Download Presentation from below link

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.


Presentation Transcript

Slide1

Slide2

What

is

Voltage

and Amperes??

Slide3

Container 1

Slide4

5 m0 m

Container

1

Slide5

5 m0 m

Container

1

Container

2

0 m

Slide6

4 m0 m

Container

1

Container

2

1 m

0 m

Slide7

0 m

Container

1

Container

2

5 m0 m

Slide8

5 V0 V

Container

1

Slide9

5 V

0 V

Container

1

Container

2

0 V

Slide10

0 V

Container

1

Container

2

5 V0 V

Slide11

How

to

turn

on an

LED?Current flows always from

the

positive pin to

the

negative

Slide12

Components

Power

supply

ResistanceLED Jumpers

Slide13

Breadboard

Perfect

for

prototyping

Fast

connection

, no

need

to

solder

every

connection

Reusable

The

lines

that

are

shown

in

the

image

are

connected

Slide14

Breadboard

River

1

River

2

Wall

Slide15

Breadboard

River

1

Wall

River

2

Slide16

Assemble

our

first circuit

Slide17

Assemble

our

first circuit

5V

River

Slide18

Assemble

our

first circuit

5V

River

Resistance

River

Slide19

Assemble

our

first circuit

5V

River

Resistance

River

Leg

1

Leg

2

Slide20

Assemble

our

first circuit

5V

River

Resistance

River

Leg

1

Leg

1

Leg

2

Slide21

Assemble

our

first circuit

5V

River

Resistance

River

Leg

1

Leg

2

Leg

2

Leg

1

Slide22

Assemble

our

first

circuit

5V

River

Resistance

River

Leg

1

Leg

2

LED

River

Leg

2

Leg

1

Slide23

Assemble

our

first circuit

5V

River

Resistance

River

Leg

1

Leg

2

LED

River

Leg

3

Leg

2

Leg

3

Leg

1

Slide24

Assemble

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

Slide25

Assemble

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

Slide26

Assemble

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

Slide27

Assemble

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

Slide28

Where

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.

Slide29

Where

is

the power

supply?

5V

River

GND

River

Slide30

Where

is

the power

supply?

5V

River

GND

River

Slide31

Challenge

nº1

You

have

15 min!!

5 V

GND

Slide32

Button

Slide33

Challenge

nº2

You

have

5 min!!

5 V

GND

Slide34

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

Slide35

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

Slide36

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

Slide37

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

Slide38

Install

the

software

Go

to this link : https://www.arduino.cc/en/main/software

Windows

Mac

Linux

Slide39

Install

the

software

Download

it

Slide40

Install

teensy

driver

Go

to this link : https://www.pjrc.com/teensy/td_download.html

Windows

Mac

Linux

Slide41

Arduino

IDE

Slide42

Arduino

IDE

1

2

3

Slide43

Arduino

IDE

1

2

3

Slide44

Arduino

IDE

Change

13 to 11

Slide45

Arduino

IDE

Click

on

Verify

Slide46

Arduino

IDE

Slide47

Arduino

IDE

Click

on

upload

Slide48

Arduino

IDE

Slide49

Challenge

nº3

MAGIC

Slide50

Arduino

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

Slide51

Arduino

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

Slide52

Arduino

Code

Types

of variables

int

char

Slide53

Arduino

Code

Types

of variables

int

char

int

Number

char

Name

Slide54

Arduino

Code

Types

of variables

int

char

int

Number

char

Name

int

Number

= 15;

Char

Name

= ‘a’;

Slide55

Arduino

Code

Functions allows a programmer to create modular pieces of code

Slide56

Arduino

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

Slide57

Arduino

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

Slide58

Arduino

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…

Slide59

Arduino

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…

Slide60

Arduino

Code

Arduino

has built-in functions that can be use for

different

situations

Slide61

Arduino

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

Slide62

Arduino

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

Slide63

Arduino

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

Slide64

Arduino

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

Slide65

Arduino

Code

11

Slide66

Arduino

Code

11

Slide67

Arduino

Code

Slide68

Arduino

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

Slide69

Challenge

nº 4

Send

a S.O.S.

signal

from arduino with the built-in LED

You

have

15 minutes!!

Slide70

Using

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

Slide71

Using

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

Slide72

Using

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

Slide73

Challenge

nº 5

Send

the S.O.S. only when you

press

the

push

button

5 V

PIN 0

GND

You

have

10 minutes!!

Slide74

The

Big

Challenge

Create a game of your own using:

You

have

90 minutes!!