Arduino_eghost2ndDay

30
ARDUINO …Hands-On @dieguich, @juanarmentia, [email protected] & @jon_lazaro

description

Spacial thanks again to @jon_lazaro @juanarmentia juanjose.echevarria y @p_curiel you're help have made possible this workshop

Transcript of Arduino_eghost2ndDay

Page 1: Arduino_eghost2ndDay

ARDUINO…Hands-On

@dieguich, @juanarmentia, [email protected] & @jon_lazaro

Page 2: Arduino_eghost2ndDay

2

PLANIFICACIÓN DEL CURSO

Primer día (2h teoría) Introducción El mundo de Arduino

OSHW Plataformas y Shields Sensores y Actuadores

Motivación: Proyectos IDEs

Arduino y otros IDEs Primer contacto (Blink).

Segundo día (2h práctica) Librerías de Arduino (Ej. Servo Motores). Hands-on 4 sketches. Preguntas, dudas, evaluación.

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 3: Arduino_eghost2ndDay

3

FIRST EXAMPLE (BLINK)

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 4: Arduino_eghost2ndDay

4

FIRST EXAMPLE (BLINK)

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 5: Arduino_eghost2ndDay

5

LÓGICA DE PROGRAMACIÓNA

rdu

ino - #

eg

host 2

6-2

7/2

01

2

Page 6: Arduino_eghost2ndDay

6

FIRST EXAMPLE (BLINK)

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Upload

Page 7: Arduino_eghost2ndDay

7

¿QUÉ VAMOS A USAR?

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 8: Arduino_eghost2ndDay

8

SENSORES Y ACTUADORES (I)A

rdu

ino - #

eg

host 2

6-2

7/2

01

2

Page 9: Arduino_eghost2ndDay

9

SENSORES Y ACTUADORES (I)A

rdu

ino - #

eg

host 2

6-2

7/2

01

2

Page 10: Arduino_eghost2ndDay

10

SENSORES Y ACTUADORES (I)

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Photocell (light sensor)

Rotation sensor(potentiometer)

Simple buttons

Page 11: Arduino_eghost2ndDay

11

SENSORES Y ACTUADORES (II)

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Motores

Luces Led

Piezo Buzzer

Page 12: Arduino_eghost2ndDay

12

OTROS….

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Cables

Luces Led

Page 13: Arduino_eghost2ndDay

13

OTROS….

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 14: Arduino_eghost2ndDay

14

LIBRERÍAS ARDUINO (I)

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Funcionalidad Extra (Hardware o datos)

Page 15: Arduino_eghost2ndDay

15

LIBRERÍAS ARDUINO (I)

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Funcionalidad Extra (Hardware o datos)

~/Arduino/libraries/ ~/Arduino/sketchbook/libraries/

Page 16: Arduino_eghost2ndDay

16

LIBRERÍAS ARDUINO (I)

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Funcionalidad Extra (Hardware o datos)

~/Arduino/libraries/ ~/Arduino/sketchbook/libraries/

Cabecera <* .h> y el fuente <*.cpp> Carpeta/Directorio

Page 17: Arduino_eghost2ndDay

17

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

LIBRERÍAS ARDUINO (II)

Page 18: Arduino_eghost2ndDay

18

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

LIBRERÍAS ARDUINO (III)

Importar la librería a tu Sketch

Crear un nuevo objeto de la librería

Configurar tu objeto (dependiendo de la librería)

Llamar la función que necesites

Page 19: Arduino_eghost2ndDay

19

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

LIBRERÍAS ARDUINO (IV)

Crea tus propias librerías!!!

Page 20: Arduino_eghost2ndDay

20

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

LIBRERÍAS ARDUINO (IV)

Page 21: Arduino_eghost2ndDay

21

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

LIBRERÍAS ARDUINO (IV)

Page 22: Arduino_eghost2ndDay

22

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

LIBRERÍAS ARDUINO (IV)

Page 23: Arduino_eghost2ndDay

23

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

LIBRERÍAS ARDUINO (IV)

Page 24: Arduino_eghost2ndDay

24

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 25: Arduino_eghost2ndDay

25

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 26: Arduino_eghost2ndDay

26

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 27: Arduino_eghost2ndDay

27

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 28: Arduino_eghost2ndDay

28

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 29: Arduino_eghost2ndDay

29

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2

Page 30: Arduino_eghost2ndDay

30

Ard

uin

o - #

eg

host 2

6-2

7/2

01

2