Question: what is the difference between analog and digital pins?
Answer: An analog signal is one that can take on any number of values, unlike a digital signal which has only two values: HIGH and LOW. ... The function used to output a PWM signal is analogWrite(pin, value). pin is the pin number used for the PWM output. value is a number proportional to the duty cycle of the signal.