Activa JavaScript para disfrutar de los vídeos de la Mediateca.
Arduino: the Arduino Board - 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:
Hello, today I'm going to show you how a real Arduino board works
00:00:00
Because until today we've been programming using a simulation
00:00:07
Today I have here with me a real Arduino board
00:00:12
You can see it on the right of the record
00:00:16
A real Arduino board
00:00:20
You can see that it looks really similar to the one we are using to simulate
00:00:22
Here, in the upper part, there are the digital connections, the same way you have them on the simulation, and here I have a protoboard with three LEDs connected to it, and you see that there are three LEDs, yellow, green and red, everyone connected to these three wires, and here I have, as you can see, I have the ground connector, okay?
00:00:28
I will connect them to the Arduino board.
00:00:56
The ground is going to be connected to the ground here,
00:01:00
and we are going to use 13,
00:01:06
12 and 11, ok? We need the ground
00:01:10
to close the circuit, and we need the three
00:01:17
connectors to give or not energy
00:01:21
to the circuit, ok? So now we have everything we need here
00:01:25
the real one in the simulation we can connect everything the same way and i'm going to do it
00:01:29
this way i'm going to connect three dds that are here as you can drag as you can drag
00:01:34
and drag i change colors
00:01:46
green all right i have the three of them i have the three resistors
00:01:57
All of them have to be the number 220 ohms, 220 ohms here, 220 ohms here, and I'm going
00:02:03
to connect three of them to 13, this guy is going to be red one, green one, and this one
00:02:25
is going to be green one.
00:02:38
It doesn't matter if they cross each other because they are not connected, each one is crossing above the previous one.
00:02:40
And also I have the brown, the brown from here, with the horizontal line, black as usual, and black again, black again.
00:02:49
I want to connect it in a different way. Yellow is going to be here, red is going to be here.
00:03:08
it doesn't make a huge difference, it's just two things in a clear way, okay, I have all the three
00:03:17
connectors, the three resistors I showed, connected to ground and the CADD is connected to the three
00:03:33
connectors, okay, so I have the same circuit here, you see it is exactly the same connection,
00:03:39
the three wires connected to the Arduino board and the ground to close the circuit connected here,
00:03:45
Okay, now I'm going to program the simulation, I'm going to use the simulation to program
00:03:51
and I'm going to program it the same way I programmed the sequence of leads, of LED's
00:03:57
So, we need to program it, we need 13 high, then we wait a second, and then 13 low
00:04:04
and I will do the same with 12, I can duplicate, the same with 12 and the same with 11
00:04:19
because they are the three ones we are using, 11, 11
00:04:35
so everything has been programmed properly, as you can see
00:04:47
I can close the code just to see the data and I will simulate
00:04:51
the simulation works as expected, fine, perfect
00:04:56
so now, the idea of simulations is that they are really useful to check if
00:05:00
everything has been designed properly, because sometimes you make mistakes when
00:05:07
we are designing, and doing simulation before making the real circuit usually is a good idea
00:05:10
so anyway, now we know that the simulation needs to work, how can we
00:05:18
program the real circuit, the one we have here, how can we program it, okay, we need
00:05:24
the code where is the code here if you press on code the code appears but we don't need the
00:05:29
block the blocks are useful we need something else so here we have blocks but we need blocks
00:05:34
can you see it this is the real program this is the one we are going to upload to the real
00:05:42
arduino board so right click copy and we are going to open a new program that is called
00:05:47
the Arduino IDE. The Arduino IDE is the program we use to program the real Arduino.
00:05:54
Now I will remove the code that appears by default
00:06:05
and I will paste the code generated by the simulator. I will repeat. Here,
00:06:09
because of the blocks, the blocks can be translated into text
00:06:19
and this text is the one i have copied and pasted here to the IDE Arduino
00:06:26
now i have this program here and this is the one i'm going to upload
00:06:32
to the Arduino board to upload it the first thing we need is connecting
00:06:36
Arduino board to the computer as you see this wire
00:06:41
it's an usb connector you can see it i'm going to connect it to the computer
00:06:44
and now the Arduino board is shining there are some lights you can see them
00:06:52
here for example this one and this one is Chinese no wonder so now the Arduino board is connected
00:06:56
to the computer and i have opened the application the Arduino IDE to upload it i'm going to upload
00:07:04
it the first thing is to check that the program is correct i click this button i have to save it
00:07:10
okay and okay check everything no no mistakes here it means that it will work and now i go to
00:07:16
I'm going to upload to this and click on this arrow and now the Arduino board has the code
00:07:23
and what happens if we have a look at the Arduino board can you see the three LEDs shining
00:07:31
it looks exactly the same way the simulation looks exactly the same so
00:07:39
and I repeat I have programmed the Arduino board using this wire this USB connected to the
00:07:46
the computer and using this program, the IDE Arduino,
00:07:52
and in the Arduino IDE, I'm sorry,
00:07:59
I have pasted the code generated by here,
00:08:01
generated from the code, from the blocks,
00:08:05
just translating them into code.
00:08:10
This is the way we program Arduino.
00:08:12
And now, perfect, the Arduino board,
00:08:15
the real one works the same way, the simulation.
00:08:17
see that it looks exactly the same. Okay, perfect. Maybe some of you think that it's the computer
00:08:21
that is controlling the LEDs that are shining, but they are not. How do we know it? Because now,
00:08:29
if I unplug this wire, the Arduino board will be off, because now the Arduino board,
00:08:35
the computer is providing energy to the Arduino board. But what happens if I unplug this wire?
00:08:44
I unplug it, the Arduino board has no energy, it doesn't work anymore, but I will provide energy in a different way.
00:08:49
This wire, the one that appears now, comes from a source of energy and I will connect it here.
00:08:58
The Arduino is not connected to the computer anymore, it has its own source of energy and again the LEDs are changing.
00:09:04
So it means that the program that has been uploaded to the Arduino board remains in its memory.
00:09:13
Okay, you understand the idea?
00:09:19
So the Arduino board is a device that can be programmed and it can be run every program you want by itself.
00:09:20
The only thing it needs is a source of energy.
00:09:30
Okay, and now you can see it works.
00:09:33
This is very, very important because sometimes the Arduino board are, they are on robots and they control the robot without the help of any computer, okay?
00:09:35
So, I think this video tutorial has been interesting and at least you have seen a real Arduino board, okay?
00:09:46
Thank you for your attention.
00:09:54
- Autor/es:
- David Gonzalez Arroyo
- Subido por:
- David G.
- Licencia:
- Reconocimiento - No comercial - Compartir igual
- Visualizaciones:
- 229
- Fecha:
- 10 de enero de 2021 - 18:18
- Visibilidad:
- Público
- Centro:
- IES MARIE CURIE Loeches
- Duración:
- 09′ 56″
- Relación de aspecto:
- 1.78:1
- Resolución:
- 1920x1080 píxeles
- Tamaño:
- 56.25 MBytes