This function in our case used to light a LED allows us to vary the power of the light through the pins. For example, pins 3 and 11 at the Leonardo also run at 980 Hz.
The procedure for generating an analog signal is called PWM. PWM signal modulation signal by pulse width. PW (Pulse Width) or pulse width, represents the width (in time) of the pulse. Length / period (period), or cycle, is the total time the signal lasts. The frequency is defined as the number of pulses (state on / off) per second and its mathematical expression is the inverse of the period, as the following equation shows. In Arduino, the PWM output signal (pins 3,5,6,9,10, and 11) is a signal of frequency 490 Hz approximately and that only allows us to change the "duty cycle" or the time that the pulse is active (on) or inactive (off), using the analogWrite () function. Another way to generate PWM signals is by using the capacity of the microprocessor.Have 5v