Let's come back to our digital pings on the audio, as you can see, some of the pings have a bit of
volume function.
I'm going to explain what is B.W. in just a moment so you can recognize them with the Tildy.
Need a number for the pin on Arduino.
You know, out of the 14 digital pings, six of them can be used as output beams with a bit of value
when they are pings, number three, five, six, nine, 10 and 11.
Now, what is a bit of a win win means both with modulation.
That's quite a complicated name.
But you will see it's quite easy to understand when you use a digital pin with a binary state.
Either the voltage is high, which means five all the time are low, which means zero volt all the time.
With a pinger win, you can choose to make the signal high only a fraction of the time, and this fraction
of the time in percentage is called the duty cycle.
So here we have three examples.
First, we have a duty cycle of zero percent.
This means that the signal will be high zero percent of the time.
Thus the signal is always low.
In practice, this is the exact same as just using digital right with low.
If we look at the third example on the bottom here, we have a duty cycle of 100 percent.
That means that signal will be high 100 percent of the time.
Thus the signal is always higher.
In practice, this is the exact same as just using digital rights with height.
And now the interesting part, if you look at the example in the middle, you can see we have a duty
cycle of 25 percent.
This means that the signal will be high 25 percent of the time and low 75 percent of the time.
In practice, for example, when you go on and instead using the P the volume of a digital.
Well, if you see 25 percent of the duty cycle, it's very similar as if instead of supplying five votes
to the pin, you just supplied one point twenty five volt, which corresponds to 25 percent of the vote.
Thus, you can expect the energy to be both on that with a lower intensity.
To make it simple, just think about the duty cycle of the people, um, as a percentage of the total
voltage.
And you can see that if you modify the volume duty cycle between zero and one hundred percent, you
can have much more control over the average voltages supply to your components.
Now on the Arduino, the percentage will be represented by an integer number between zero and two hundred
fifty five zero is, of course, zero percent and two hundred fifty five is one hundred percent.
If you want to apply a 25 percent duty cycle for the PITIABLY, when you will then need to give twenty
five percent of 255, which is about 64.
So let's complete our diagram.
We are still setting the mode for the digital Pinas output and then we have two options.
Either we use the PIN with a binary state, which means we use the digital right function with a high
or low ball.
And this only applies to things with the PWI in March, we can set an analog value using the analog
right function, which we are going to see in the next listen and provide a value between zero and 255,
which corresponds to the percentage of the duty cycle.