1
00:00:00,840 --> 00:00:09,810
Now, let's control a set of amateur using the P.W. capability of our ISP 30 to the code will be basically

2
00:00:09,810 --> 00:00:13,410
the same one that was used to control the LED brightness.

3
00:00:14,100 --> 00:00:21,300
First, it's important to remember that the frequency to work with a make or servo motor is 15 hertz,

4
00:00:21,600 --> 00:00:22,380
so we have to.

5
00:00:22,400 --> 00:00:31,320
It's the first value, which is the frequency, and we must change it to 15 or 50 instead of 5000.

6
00:00:31,920 --> 00:00:37,980
We must also specify that it beat channel and the resolution of the P.W. duty cycle.

7
00:00:39,420 --> 00:00:44,580
We will assign or use again the Channel zero and resolution of eight.

8
00:00:44,850 --> 00:00:47,430
Let's go with this code and create a new sketch.

9
00:00:48,330 --> 00:00:50,220
Let's paste it and save it.

10
00:00:52,240 --> 00:00:53,200
The same location.

11
00:00:56,670 --> 00:00:59,100
Let's call it P.W. I'm terrible.

12
00:01:08,080 --> 00:01:10,120
Now, let's close this one.

13
00:01:15,560 --> 00:01:16,790
And let's open up this one.

14
00:01:16,850 --> 00:01:17,210
OK.

15
00:01:19,100 --> 00:01:24,950
Now, here's our code, we need to change this to 50 and the same.

16
00:01:26,000 --> 00:01:28,400
Chartbuster fled, let's call it for.

17
00:01:31,930 --> 00:01:42,430
Now we have used the Channel Zero Hose Evolution, eight year cycle zero, and let's connect our greatest

18
00:01:42,430 --> 00:01:43,000
things here.

19
00:01:45,580 --> 00:01:48,040
Let's connect our server to pin number five.

20
00:01:48,070 --> 00:02:00,010
So into it, let's see a dash pin to the central panel, which is pin number five, and change the channel

21
00:02:00,010 --> 00:02:01,210
with several channel.

22
00:02:06,500 --> 00:02:09,090
Now we have everything ready.

23
00:02:10,490 --> 00:02:18,170
We have used the same parameters set with channel frequency resolution and pin number five, which we

24
00:02:18,170 --> 00:02:23,870
are using to connect our server and the server channel, which we already mentioned here Channel zero

25
00:02:23,870 --> 00:02:25,370
for the BW signal.

26
00:02:26,120 --> 00:02:28,850
Same here server channel and its cycle.

27
00:02:29,810 --> 00:02:30,170
Now.

28
00:02:32,350 --> 00:02:39,210
To position the server on a specific angle, we must define the duty cycle, for example, to position

29
00:02:39,220 --> 00:02:43,510
ourselves around 90 degrees, that each cycle must be around 21.

30
00:02:44,080 --> 00:02:53,140
And the function let's see right, should be used to send the value through the P.W. armchair so we

31
00:02:53,140 --> 00:03:00,670
can simply say 21 here and it will be sent using this.

32
00:03:01,060 --> 00:03:02,170
Let's see, right?

33
00:03:02,650 --> 00:03:04,840
So it will be at 90 degree.

34
00:03:08,090 --> 00:03:14,060
Now, defunct values of the good cycle will position the server with different angles.

35
00:03:15,020 --> 00:03:19,400
This variable youth cycle should vary from 10 to 30 to.

36
00:03:20,950 --> 00:03:26,590
And this range was gotten manually, so it will be between 10.

37
00:03:31,990 --> 00:03:32,980
And that's to.

38
00:03:36,170 --> 00:03:39,050
Now to simply to starve this code after.

39
00:03:41,850 --> 00:03:48,770
Writing it, you need to go to the tools, check the port and choose the compost where you your.

40
00:03:49,560 --> 00:03:59,520
Yes, people disconnected and from this menu, choose the wheat board that we are using, though it

41
00:03:59,520 --> 00:04:08,040
is P32, the get that one or any other word that you are using and then upload your pod to that board.

42
00:04:21,700 --> 00:04:28,060
It will take some time to compile the code and then uploaded to the ISP board.

43
00:04:29,520 --> 00:04:31,350
Now connecting.

44
00:04:57,420 --> 00:05:01,500
OK, now done uploading and open up the serial monitor.

45
00:05:03,200 --> 00:05:04,390
Change the board rate.

46
00:05:06,320 --> 00:05:12,030
Now you can see that the water is rotating and resetting.

47
00:05:12,290 --> 00:05:17,990
Now we can increase the day, you can make it 100 to slow down the rotation.

48
00:05:18,650 --> 00:05:24,470
But as you can see, this is how easily you can't control a self-promoter using an ISP ball.

49
00:05:25,280 --> 00:05:28,550
Now, if you have any question regarding anything, I'm here to help you.

50
00:05:28,640 --> 00:05:29,510
Thanks for watching.

51
00:05:29,540 --> 00:05:32,390
This is Ashraf from educational engineering team.

