1 00:00:00,080 --> 00:00:01,080 Good morning. 2 00:00:01,080 --> 00:00:04,759 Today we are going to create a new circuit. 3 00:00:04,759 --> 00:00:13,240 I have already logged in in Tinkercad and now I'm going to click on Crear Nuevo Circuito, 4 00:00:13,240 --> 00:00:15,240 Create New Circuit. 5 00:00:15,240 --> 00:00:18,480 I'm in. 6 00:00:18,480 --> 00:00:25,839 As always, the first thing I need is the protoboard, the Arduino board and now I'm going to click 7 00:00:25,839 --> 00:00:28,000 and drag the LEDs. 8 00:00:28,000 --> 00:00:34,320 Because in this exercise, instead of controlling one single LED, we are going to control four 9 00:00:34,320 --> 00:00:35,320 of them. 10 00:00:35,320 --> 00:00:37,359 We are going to control a sequence of LEDs. 11 00:00:37,359 --> 00:00:42,420 So I am going to click and drag one of them, this one is connected here and here, remember 12 00:00:42,420 --> 00:00:47,000 that the vertical lines are all of them together, the five of them are together. 13 00:00:47,000 --> 00:00:58,369 So I have one LED, a second one, a third one, and a fourth one. 14 00:00:58,369 --> 00:01:10,489 The first one is going to be controlled with pin number 13, we connect it to the anode, 15 00:01:10,489 --> 00:01:20,290 the one that is not straight, 13 with this one, the second one with 12, the third one 16 00:01:20,290 --> 00:01:25,989 with 11 and the fourth one with 10. 17 00:01:25,989 --> 00:01:27,750 But remember we need to close the circuit. 18 00:01:27,750 --> 00:01:33,150 All of them are going to be connected to ground, to this connector. 19 00:01:33,150 --> 00:01:39,010 I'm going to use it in a different way. 20 00:01:39,010 --> 00:01:44,709 This one will be the ground, so I'm going to connect it here, I'm going to draw it black, 21 00:01:44,709 --> 00:01:52,409 the same for this one, black again, I need more room so I'm going to move it here, and 22 00:01:52,409 --> 00:02:04,129 the same for this one, to make the drawing clearer. Black, black, the same for this one, 23 00:02:04,129 --> 00:02:16,169 black, and the same for this one. Black. Ok. Now, I need the resistor. Remember that every 24 00:02:16,169 --> 00:02:24,610 time we send a current to an LED, we need a protection resistor. And remember, we need 25 00:02:24,610 --> 00:02:32,050 a 220 ohms one so I click on the resistor and I type 220 but instead of kilo ohms we're going 26 00:02:32,050 --> 00:02:39,090 to use ohms so I have my resistor now and my resistor I'm going to connect it here 27 00:02:40,129 --> 00:02:46,610 is the resistor connected to the four ones yes because of this horizontal line the lower 28 00:02:47,169 --> 00:02:53,810 connector of the resistor this one is connected to this this this and this because all of them 29 00:02:53,810 --> 00:02:59,490 are connected using the horizontal line and now i'm going to use the ground connector and i'm 30 00:02:59,490 --> 00:03:08,099 going to connect it here maybe it looks a little bit messy okay now i think it looks better okay 31 00:03:08,099 --> 00:03:13,900 this is the ground connector and through the resistor is is connected to this one this one 32 00:03:13,900 --> 00:03:20,360 this one and this one okay so now i have all the connections i need now it's time to program the 33 00:03:20,360 --> 00:03:26,979 Arduino board, because it's the one that is controlling, that will control the 4 LED. 34 00:03:26,979 --> 00:03:31,280 So I click on the code button and I don't need this one. 35 00:03:31,280 --> 00:03:35,580 So I'm going to program the Arduino board this way. 36 00:03:35,580 --> 00:03:39,580 Number 13 will be on for one second and then it will be off. 37 00:03:39,580 --> 00:03:43,460 And then the moment this one is off, this one will start shining, and the same with 38 00:03:43,460 --> 00:03:44,780 this one, the same with this one. 39 00:03:44,780 --> 00:03:53,639 So the first thing we are going to do is defining number 13 or switching number 13 to on. 40 00:03:53,639 --> 00:04:01,139 Then we will wait for one second and after having waited for one second, number 13 will 41 00:04:01,139 --> 00:04:07,840 be off, 13 and low, that is the same. 42 00:04:07,840 --> 00:04:13,439 The moment 13 has been high for one second and now is off, it will happen the same with 43 00:04:13,439 --> 00:04:19,019 12 with 12 and sorry 11 and 10 so we will repeat this block how can we repeat 44 00:04:19,019 --> 00:04:23,519 the same okay we can click on that and drag again that is easier if we right 45 00:04:23,519 --> 00:04:29,160 click and we click on duplicate so I have the same for I will have the same 46 00:04:29,160 --> 00:04:53,709 for 12 12 and 12 I duplicate again to pick up 11 and 11 and I duplicate again 47 00:04:53,709 --> 00:05:06,050 then because 10 is the last one I made a mistake and now I have to connect we 48 00:05:06,050 --> 00:05:11,290 have four parts of the program but now I'm going to connect all of them. I click 49 00:05:11,290 --> 00:05:15,990 and drag and now they are all of them connected. And it's the same idea for all 50 00:05:15,990 --> 00:05:21,470 of them. On for one second and then off and at this moment the second one 51 00:05:21,470 --> 00:05:26,810 starts shining. And if I click here... No, I'm not going to click here. If I 52 00:05:26,810 --> 00:05:33,610 click in Iniciar Simulación, let's have a look. Can you see the sequence? So this 53 00:05:33,610 --> 00:05:38,850 is the X our exercise good luck