Activa JavaScript para disfrutar de los vídeos de la Mediateca.
Arduino: sequence - Contenido educativo
Ajuste de pantallaEl ajuste de pantalla se aprecia al ver el vídeo en pantalla completa. Elige la presentación que más te guste:
Good morning.
00:00:00
Today we are going to create a new circuit.
00:00:01
I have already logged in in Tinkercad and now I'm going to click on Crear Nuevo Circuito,
00:00:04
Create New Circuit.
00:00:13
I'm in.
00:00:15
As always, the first thing I need is the protoboard, the Arduino board and now I'm going to click
00:00:18
and drag the LEDs.
00:00:25
Because in this exercise, instead of controlling one single LED, we are going to control four
00:00:28
of them.
00:00:34
We are going to control a sequence of LEDs.
00:00:35
So I am going to click and drag one of them, this one is connected here and here, remember
00:00:37
that the vertical lines are all of them together, the five of them are together.
00:00:42
So I have one LED, a second one, a third one, and a fourth one.
00:00:47
The first one is going to be controlled with pin number 13, we connect it to the anode,
00:00:58
the one that is not straight, 13 with this one, the second one with 12, the third one
00:01:10
with 11 and the fourth one with 10.
00:01:20
But remember we need to close the circuit.
00:01:25
All of them are going to be connected to ground, to this connector.
00:01:27
I'm going to use it in a different way.
00:01:33
This one will be the ground, so I'm going to connect it here, I'm going to draw it black,
00:01:39
the same for this one, black again, I need more room so I'm going to move it here, and
00:01:44
the same for this one, to make the drawing clearer. Black, black, the same for this one,
00:01:52
black, and the same for this one. Black. Ok. Now, I need the resistor. Remember that every
00:02:04
time we send a current to an LED, we need a protection resistor. And remember, we need
00:02:16
a 220 ohms one so I click on the resistor and I type 220 but instead of kilo ohms we're going
00:02:24
to use ohms so I have my resistor now and my resistor I'm going to connect it here
00:02:32
is the resistor connected to the four ones yes because of this horizontal line the lower
00:02:40
connector of the resistor this one is connected to this this this and this because all of them
00:02:47
are connected using the horizontal line and now i'm going to use the ground connector and i'm
00:02:53
going to connect it here maybe it looks a little bit messy okay now i think it looks better okay
00:02:59
this is the ground connector and through the resistor is is connected to this one this one
00:03:08
this one and this one okay so now i have all the connections i need now it's time to program the
00:03:13
Arduino board, because it's the one that is controlling, that will control the 4 LED.
00:03:20
So I click on the code button and I don't need this one.
00:03:26
So I'm going to program the Arduino board this way.
00:03:31
Number 13 will be on for one second and then it will be off.
00:03:35
And then the moment this one is off, this one will start shining, and the same with
00:03:39
this one, the same with this one.
00:03:43
So the first thing we are going to do is defining number 13 or switching number 13 to on.
00:03:44
Then we will wait for one second and after having waited for one second, number 13 will
00:03:53
be off, 13 and low, that is the same.
00:04:01
The moment 13 has been high for one second and now is off, it will happen the same with
00:04:07
12 with 12 and sorry 11 and 10 so we will repeat this block how can we repeat
00:04:13
the same okay we can click on that and drag again that is easier if we right
00:04:19
click and we click on duplicate so I have the same for I will have the same
00:04:23
for 12 12 and 12 I duplicate again to pick up 11 and 11 and I duplicate again
00:04:29
then because 10 is the last one I made a mistake and now I have to connect we
00:04:53
have four parts of the program but now I'm going to connect all of them. I click
00:05:06
and drag and now they are all of them connected. And it's the same idea for all
00:05:11
of them. On for one second and then off and at this moment the second one
00:05:15
starts shining. And if I click here... No, I'm not going to click here. If I
00:05:21
click in Iniciar Simulación, let's have a look. Can you see the sequence? So this
00:05:26
is the X our exercise good luck
00:05:33
- Autor/es:
- David Gonzalez Arroyo
- Subido por:
- David G.
- Licencia:
- Reconocimiento - No comercial - Compartir igual
- Visualizaciones:
- 242
- Fecha:
- 10 de enero de 2021 - 17:01
- Visibilidad:
- Público
- Centro:
- IES MARIE CURIE Loeches
- Duración:
- 05′ 37″
- Relación de aspecto:
- 1.78:1
- Resolución:
- 1920x1080 píxeles
- Tamaño:
- 17.61 MBytes