Now, let's control ourselves, water, using the capability of our E.S.P 30 to the code will be basically
the same one that was used to control that brightness.
First, it's important to remember that the frequency to work with a micro servo motor is 15 hertz.
So we have to edit the first value, which is the frequency, and we must change it to 15 or 50 instead
of five thousand.
We must also specify that the channel and the resolution of the PWI 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 based it and save it.
The same location.
Let's call it PWI Answerable.
Now, let's close this one.
And let's open up this one.
OK.
Now, here's our quote, We need to change this to 50 and the same.
Charles Watson fled, let's call it Servoz.
Now, we have used the Channel Zero, Resolution eight news cycle zero, and let's connect our greatest
things here, disconnect our service to PIN number five.
So we need to edit us, see Atash PIN to the server, which is PIN number five, and change the channel
with server channel.
Now we have everything ready, we have used the same parameters set for 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 signal.
Same here, serve a channel and you'd cycle now.
To position the serve on a specific angle, we must define that duty cycle.
For example, the position that we have around 90 degrees that each cycle must be around 21.
And the function Lizzi.
Right.
Should be used to send that value through the PWI channel so we can simply say twenty one here and it
will be sent using this lidsky.
Right.
So it will be at 90 degree.
Now, different values of the cycle well positioned to serve all different angles, this variable,
each cycle should vary from 10 to 30 to.
And this range was gotten manually, so it will be between 10.
I wanted to.
Now to simply out this code after.
Writing it, you need to go to the tools, check the port and choose the compost where you yes, people
disconnected and from this menu choose that the whiteboard that we are using, do it E.S.P 30 to defecate
where one or any other word that you are using and then upload your code to that board.
It will take some time to compile the code and then upload it to the ISP board.
Now connecting.
OK, now done uploading and we open up the serial monitor.
Change the board rate.
Now you can see that the surface water is rotating and receding, now you can increase the delay, you
can make it 100 to slow down the rotation.
But as you can see, this is how easily you can control a cell phone water using an ISP ball.
Now, if you have any question regarding anything, I'm here to help you.
Thanks for watching.
This is Asharaf from educational engineering team.