1 00:00:00,560 --> 00:00:11,560 Now we are going to talk about motors or engine and how we can use the different types of motors with the Arduino board. 2 00:00:11,560 --> 00:00:19,559 It's very important because if you want to create a machine, an automatic machine, a robot or something similar, 3 00:00:19,559 --> 00:00:27,879 motors are very important in in this type of machines because they are usually the output 4 00:00:29,480 --> 00:00:39,000 of the wars both are digital outputs or they can be it seems that these are analogic but 5 00:00:39,000 --> 00:00:45,320 indeed they are digital both this is the mini servo have three cables 6 00:00:45,320 --> 00:00:55,820 one is brown or black and it must be connected to ground another is red and it's much connected to 7 00:00:55,820 --> 00:01:04,579 a power sources and finally another is connected to a digital P the same in the other in the other 8 00:01:04,579 --> 00:01:15,260 all the same and the connection to the board is always the same so the the ground you connect 9 00:01:15,260 --> 00:01:26,480 the ground to the ground in the board and the red to five volts in the pin of five volts 10 00:01:26,480 --> 00:01:35,519 and the other one in a digital pin for example it can be eight so this is the connection 11 00:01:37,200 --> 00:01:43,599 one to ground ground to five volts and another to digital pin we have connected 12 00:01:43,599 --> 00:01:55,840 the diminisher so now we need to create a program what happened obviously program must be programming 13 00:01:55,840 --> 00:02:02,540 you must programming using Arduino language but everybody knows that the Arduino language is very 14 00:02:02,540 --> 00:02:15,560 complicated and unfortunately you haven't servos in Tinkercad I think so 15 00:02:16,680 --> 00:02:22,180 so if you want to create a program 16 00:02:24,770 --> 00:02:33,189 you must choose something that make easier the program not just the Arduino 17 00:02:33,189 --> 00:02:47,210 Because Arduino is a language very complicated. Well, indeed, it's dependent. If you learn, it's not so complicated. But yes, it's very unfriendly environment. It's quite complicated. 18 00:02:47,210 --> 00:03:13,479 The other option can be Tinkercad, but in Tinkercad, we have used Tinkercad with LEDs, but in Tinkercad, you haven't got... 19 00:03:13,479 --> 00:03:31,860 You have motors, but it's different, and there isn't any servo motor, so you can use Tinkercad to create servo motors. 20 00:03:31,860 --> 00:03:42,240 So, other option is something similar to Tinkercad, which is, which name is BitBlock and is a BQ. 21 00:03:42,240 --> 00:04:04,780 so bigblock.bq.com and here you can log in an account but it's not necessary 22 00:04:04,780 --> 00:04:20,769 you can log in with a with one account and what happened is it needs to to pay something 23 00:04:20,769 --> 00:04:24,189 if you want to have the full service. 24 00:04:24,189 --> 00:04:25,850 But taking into consideration 25 00:04:25,850 --> 00:04:30,149 that it's just only to practice, it's not necessary. 26 00:04:30,149 --> 00:04:31,910 So click here in the command, 27 00:04:33,750 --> 00:04:34,629 bblog-robotic, 28 00:04:36,490 --> 00:04:39,430 and now you have a board. 29 00:04:39,430 --> 00:04:44,430 Our board, you can, it's blocked, you can unblock it. 30 00:04:45,129 --> 00:04:49,949 But, but, it doesn't matter because you can use, 31 00:04:49,949 --> 00:04:56,730 for example, this one. 32 00:04:56,730 --> 00:04:58,589 It's another word, but it doesn't matter 33 00:04:58,589 --> 00:05:00,410 because the code is the same. 34 00:05:01,430 --> 00:05:05,730 And apart from this, so now we use, for example, 35 00:05:05,730 --> 00:05:08,410 the mini servo that is here. 36 00:05:13,300 --> 00:05:15,339 So take the mini servo 37 00:05:22,459 --> 00:05:24,680 and connect it in APN-8. 38 00:05:24,680 --> 00:05:39,000 Now we are going to create a program. The program is the same that Scratch, Tinkercad, 39 00:05:39,000 --> 00:05:48,759 it's all the same. So, here in components, move servo to 90 degrees. The problem with 40 00:05:48,759 --> 00:05:57,699 the star bosses that just only can move from 0 to 180 so sometimes can be 41 00:05:57,699 --> 00:06:08,129 complicated to use it wait a but not to not to second because it's too much half 42 00:06:08,129 --> 00:06:33,870 a second so this is our program it's a program is a loop that is repeating all 43 00:06:33,870 --> 00:06:45,069 the time till i disconnect the board so obviously we can use it if we have a the the driver for the 44 00:06:45,709 --> 00:06:53,870 the board but it's not the train it's not the the case so what i'm going to do is click here in code 45 00:06:53,870 --> 00:07:24,779 and then select all of these, copy it, and then paste in our Arduino Intel. 46 00:07:24,779 --> 00:07:33,779 So now we have the program translated to Arduino language. 47 00:07:33,779 --> 00:07:44,180 So I'm going to connect the Arduino board to the computer in a port and as always here we have to check 48 00:07:45,139 --> 00:07:48,500 the board and the port. 49 00:07:50,500 --> 00:08:01,060 And we will have to check this. Another important thing is to include a library 50 00:08:01,060 --> 00:08:20,180 that is servo this library servo library so now check the program that is everything is 51 00:08:20,180 --> 00:08:52,580 alright and computer understand what I want and download to the board so the result is what you 52 00:08:52,580 --> 00:09:09,259 can see here it's not so difficult so we're going to repeat but now with the other circle all right 53 00:09:18,769 --> 00:09:43,409 of the three cables ground power and digital pin i i had the connection the same as you have 54 00:09:43,409 --> 00:10:09,919 tanning with yogurt exactly the same well so now go to the block take the board take the component 55 00:10:09,919 --> 00:10:38,480 but in this case is the this one anything eight oh now we're going to create a very very easy 56 00:10:38,480 --> 00:11:35,950 program, so we have it, and now I have the code, I copied it, plug the Arduino board, 57 00:11:35,950 --> 00:12:10,299 check the Arduino, check the port, include the library, check the program, and download 58 00:12:10,299 --> 00:12:35,820 the chord and the result is similar because we haven't enough time but it's not the same 59 00:12:48,269 --> 00:13:24,120 And we need more time. 60 00:13:24,120 --> 00:13:29,000 can get more time to have a complete uh 61 00:14:03,320 --> 00:14:27,129 If I give more time I can have the total wheel, so depending the time I can have more wheels, 62 00:14:27,129 --> 00:14:28,610 more rounds. 63 00:14:28,610 --> 00:14:38,149 Well, that is the practice for today.