1 00:00:00,840 --> 00:00:09,810 Now, let's control ourselves, water, using the capability of our E.S.P 30 to the code will be basically 2 00:00:09,810 --> 00:00:13,430 the same one that was used to control that brightness. 3 00:00:14,100 --> 00:00:21,330 First, it's important to remember that the frequency to work with a micro servo motor is 15 hertz. 4 00:00:21,600 --> 00:00:29,940 So we have to edit the first value, which is the frequency, and we must change it to 15 or 50 instead 5 00:00:29,940 --> 00:00:31,320 of five thousand. 6 00:00:31,920 --> 00:00:37,990 We must also specify that the channel and the resolution of the PWI duty cycle. 7 00:00:39,450 --> 00:00:44,580 We will assign or use again the Channel Zero and resolution of eight. 8 00:00:44,880 --> 00:00:47,460 Let's go with this code and create a new sketch. 9 00:00:48,300 --> 00:00:50,250 Let's based it and save it. 10 00:00:52,150 --> 00:00:53,230 The same location. 11 00:00:56,700 --> 00:00:59,080 Let's call it PWI Answerable. 12 00:01:08,080 --> 00:01:10,110 Now, let's close this one. 13 00:01:15,500 --> 00:01:16,830 And let's open up this one. 14 00:01:16,900 --> 00:01:17,210 OK. 15 00:01:19,100 --> 00:01:24,980 Now, here's our quote, We need to change this to 50 and the same. 16 00:01:26,000 --> 00:01:28,400 Charles Watson fled, let's call it Servoz. 17 00:01:31,930 --> 00:01:42,470 Now, we have used the Channel Zero, Resolution eight news cycle zero, and let's connect our greatest 18 00:01:42,470 --> 00:01:48,060 things here, disconnect our service to PIN number five. 19 00:01:48,070 --> 00:02:00,010 So we need to edit us, see Atash PIN to the server, which is PIN number five, and change the channel 20 00:02:00,010 --> 00:02:01,270 with server channel. 21 00:02:06,500 --> 00:02:15,470 Now we have everything ready, we have used the same parameters set for channel frequency resolution 22 00:02:16,010 --> 00:02:22,340 and PIN number five, which we are using to connect our server and the server channel, which we already 23 00:02:22,340 --> 00:02:25,400 mentioned here, Channel zero for the signal. 24 00:02:26,090 --> 00:02:30,200 Same here, serve a channel and you'd cycle now. 25 00:02:32,350 --> 00:02:36,890 To position the serve on a specific angle, we must define that duty cycle. 26 00:02:37,900 --> 00:02:43,510 For example, the position that we have around 90 degrees that each cycle must be around 21. 27 00:02:44,080 --> 00:02:45,490 And the function Lizzi. 28 00:02:45,490 --> 00:02:46,000 Right. 29 00:02:46,420 --> 00:02:57,850 Should be used to send that value through the PWI channel so we can simply say twenty one here and it 30 00:02:57,850 --> 00:03:01,680 will be sent using this lidsky. 31 00:03:01,690 --> 00:03:02,190 Right. 32 00:03:02,650 --> 00:03:04,870 So it will be at 90 degree. 33 00:03:08,120 --> 00:03:15,980 Now, different values of the cycle well positioned to serve all different angles, this variable, 34 00:03:16,010 --> 00:03:19,430 each cycle should vary from 10 to 30 to. 35 00:03:20,920 --> 00:03:26,620 And this range was gotten manually, so it will be between 10. 36 00:03:31,960 --> 00:03:32,980 I wanted to. 37 00:03:36,170 --> 00:03:39,080 Now to simply out this code after. 38 00:03:41,820 --> 00:03:50,260 Writing it, you need to go to the tools, check the port and choose the compost where you yes, people 39 00:03:50,300 --> 00:04:01,220 disconnected and from this menu choose that the whiteboard that we are using, do it E.S.P 30 to defecate 40 00:04:01,290 --> 00:04:08,100 where one or any other word that you are using and then upload your code to that board. 41 00:04:21,670 --> 00:04:28,120 It will take some time to compile the code and then upload it to the ISP board. 42 00:04:29,490 --> 00:04:31,410 Now connecting. 43 00:04:57,390 --> 00:05:01,530 OK, now done uploading and we open up the serial monitor. 44 00:05:03,200 --> 00:05:04,430 Change the board rate. 45 00:05:06,290 --> 00:05:14,210 Now you can see that the surface water is rotating and receding, now you can increase the delay, you 46 00:05:14,210 --> 00:05:18,020 can make it 100 to slow down the rotation. 47 00:05:18,650 --> 00:05:24,450 But as you can see, this is how easily you can control a cell phone water using an ISP ball. 48 00:05:25,250 --> 00:05:28,560 Now, if you have any question regarding anything, I'm here to help you. 49 00:05:28,670 --> 00:05:29,540 Thanks for watching. 50 00:05:29,570 --> 00:05:32,420 This is Asharaf from educational engineering team.