1 00:00:00,560 --> 00:00:09,439 Well, we are going to explain how to create and how to do the practice of Arduino. 2 00:00:09,439 --> 00:00:23,510 We use Tinkercad, so you must go to the page of Tinkercad and wait a minute because I want 3 00:00:23,510 --> 00:00:26,989 to show how to enter. 4 00:00:26,989 --> 00:00:39,149 The first, in this page you have different ways to enter. One of these is join to a class, 5 00:00:39,149 --> 00:00:45,549 so clicking join to the class and now type the code that you have in your class, 6 00:00:47,229 --> 00:00:55,630 that is this, so now click and the nickname is not whatever you want, 7 00:00:55,630 --> 00:01:09,430 It must be an ordenador and a number from 1 to 15. 8 00:01:09,430 --> 00:01:22,870 So I have to choose 6 and here we are in Tinkercad. 9 00:01:22,870 --> 00:01:32,510 Now here on the left you have different things that you can do. 10 00:01:32,510 --> 00:01:41,109 You can use Tinkercad to create your own designs for the 3D printer and it's very easy and 11 00:01:41,109 --> 00:01:42,870 quite nice. 12 00:01:42,870 --> 00:01:53,849 But we also use it to create circuits and to do the simulation of circuits. 13 00:01:53,849 --> 00:01:58,890 And in this case we are going to use it to create circuits and then you are going to 14 00:01:58,890 --> 00:02:04,310 download the program to the Arduino. 15 00:02:04,310 --> 00:02:07,650 So first of all, click in circuits. 16 00:02:07,650 --> 00:02:11,509 And here you have different options. 17 00:02:11,509 --> 00:02:20,909 So click a new circuit and think about the circuit that you want to create. 18 00:02:20,909 --> 00:02:26,550 Obviously the easier one is with just only one LED. 19 00:02:26,550 --> 00:02:27,550 And it's very easy. 20 00:02:27,550 --> 00:02:32,479 First of all, take the board. 21 00:02:32,479 --> 00:02:39,000 You know this board because we are using the board with the polimeter. 22 00:02:39,000 --> 00:02:43,280 Then take a LED. 23 00:02:43,280 --> 00:02:52,460 You know that the LED just only can work if you connect with the right polarity. 24 00:02:52,460 --> 00:02:56,120 Then take a resistor. 25 00:02:56,120 --> 00:03:02,340 My advice is that change the position of the resistor. 26 00:03:02,340 --> 00:03:08,520 The value for this resistor and the Arduino and the work condition in the Arduino, the 27 00:03:08,520 --> 00:03:24,659 best is 220 ohms. So take the resistor in the right place and now connect the 28 00:03:24,659 --> 00:03:35,900 circuit to the Arduino. LF is an output, it's a digital output, so 29 00:03:35,900 --> 00:03:47,080 you must connect in digital pin. One goes to ground and the other is in the pin 30 00:03:47,080 --> 00:03:56,509 whatever you want. For example we are going to connect to the pin 7. So now we 31 00:03:56,509 --> 00:04:01,330 have the connection, this is the right connection, but we must do the simulation 32 00:04:01,330 --> 00:04:08,490 and to do the simulation we must create our code. So click in code and now we 33 00:04:08,490 --> 00:04:19,589 have something here it is similar very similar that you have in in scratch 34 00:04:19,589 --> 00:04:28,990 because they are blocks also so they take care because although you have here 35 00:04:28,990 --> 00:04:37,470 this code in this way it doesn't work so if we do this simulation it doesn't work 36 00:04:37,470 --> 00:04:50,060 Can you see? Well, it doesn't work because this code is just only if you connect the LED in the pin 13. 37 00:04:50,060 --> 00:04:59,060 This is a very special pin. But if you connect the LED in another pin, you must change the code. 38 00:04:59,060 --> 00:05:07,339 And instead of this, you must use this one, this block. 39 00:05:07,339 --> 00:05:29,850 and here you must indicate the pin in where you have it, so in this case 7, so 40 00:05:29,850 --> 00:05:43,310 you have it. Now that the code is this. It's a very simple program that makes 41 00:05:43,310 --> 00:05:51,370 blink the left. So now if you do the simulation now you have a good result in 42 00:05:51,370 --> 00:06:04,019 the simulation. Well the problem is that it's not blinking because it's always in 43 00:06:04,019 --> 00:06:11,019 So, if you want to blink, you must change it to low. 44 00:06:11,019 --> 00:06:20,800 Now it's blinking. 45 00:06:20,800 --> 00:06:22,800 Well, this is the first part. 46 00:06:22,800 --> 00:06:28,800 The simulation that is nothing that you make. 47 00:06:28,800 --> 00:06:34,800 But now we are going to transform this in something real. 48 00:06:34,800 --> 00:06:46,800 So, you need to download the code and to download the code you must click here, in the arrow. 49 00:06:46,800 --> 00:06:53,800 Then you have downloaded the code here, you have the code here, can you see it? 50 00:06:53,800 --> 00:07:02,800 So, what you must do, do the connection, the real connection, LED, resistor and Arduino, 51 00:07:02,800 --> 00:07:18,379 arduino the three elements and then open the arduino idle and now 52 00:07:20,779 --> 00:07:26,459 well take take care that you have the right connection of the arduino and the port 53 00:07:27,420 --> 00:07:57,250 and now just load the program that you have downloaded from the tinkercad and here you 54 00:07:57,250 --> 00:08:02,129 have the code that the code is very easy to understand because it's more or less the same 55 00:08:02,129 --> 00:08:08,050 that the code you have in the blinking the only thing that you have changed is the pin mode 56 00:08:08,769 --> 00:08:16,769 that now is 7 instead of 13 um and nothing more because the other thing are the same 57 00:08:17,410 --> 00:08:24,529 so when you have the program the the rest of the process is the same uh take care 58 00:08:24,529 --> 00:08:34,529 that the right port etc and then clicking in in the arrow you must you you can download the program 59 00:08:34,529 --> 00:08:40,850 to the board you are doing a word and you have the real result of this 60 00:08:42,529 --> 00:08:50,370 uh that is all for today and i think and i hope you can do it without problem 61 00:08:50,370 --> 00:08:58,769 be patient because sometimes the problem can be just a cable or something that is wrong 62 00:08:58,769 --> 00:09:03,250 so make it possible that you can a good result at the first time 63 00:09:04,610 --> 00:09:12,129 but it's the way you must repeat if you need and don't worry about the time because i give you 64 00:09:12,690 --> 00:09:17,970 the time that you need and it's all for today i hope you you can enjoy it