Now, let's control a set of amateur using the P.W. capability of our ISP 30 to the code will be basically
the same one that was used to control the LED brightness.
First, it's important to remember that the frequency to work with a make or servo motor is 15 hertz,
so we have to.
It's the first value, which is the frequency, and we must change it to 15 or 50 instead of 5000.
We must also specify that it beat channel and the resolution of the P.W. duty cycle.
We will assign or use again the Channel zero and resolution of eight.
Let's go with this code and create a new sketch.
Let's paste it and save it.
The same location.
Let's call it P.W. I'm terrible.
Now, let's close this one.
And let's open up this one.
OK.
Now, here's our code, we need to change this to 50 and the same.
Chartbuster fled, let's call it for.
Now we have used the Channel Zero Hose Evolution, eight year cycle zero, and let's connect our greatest
things here.
Let's connect our server to pin number five.
So into it, let's see a dash pin to the central panel, which is pin number five, and change the channel
with several channel.
Now we have everything ready.
We have used the same parameters set with channel frequency resolution and pin number five, which we
are using to connect our server and the server channel, which we already mentioned here Channel zero
for the BW signal.
Same here server channel and its cycle.
Now.
To position the server on a specific angle, we must define the duty cycle, for example, to position
ourselves around 90 degrees, that each cycle must be around 21.
And the function let's see right, should be used to send the value through the P.W. armchair so we
can simply say 21 here and it will be sent using this.
Let's see, right?
So it will be at 90 degree.
Now, defunct values of the good cycle will position the server with different angles.
This variable youth cycle should vary from 10 to 30 to.
And this range was gotten manually, so it will be between 10.
And that's to.
Now to simply to starve this code after.
Writing it, you need to go to the tools, check the port and choose the compost where you your.
Yes, people disconnected and from this menu, choose the wheat board that we are using, though it
is P32, the get that one or any other word that you are using and then upload your pod to that board.
It will take some time to compile the code and then uploaded to the ISP board.
Now connecting.
OK, now done uploading and open up the serial monitor.
Change the board rate.
Now you can see that the water is rotating and resetting.
Now we can increase the day, you can make it 100 to slow down the rotation.
But as you can see, this is how easily you can't control a self-promoter using an ISP ball.
Now, if you have any question regarding anything, I'm here to help you.
Thanks for watching.
This is Ashraf from educational engineering team.