It's analogWrite(), not analogueWrite(), and not all Arduino pins are capable of PWM (most boards have marked the ones that can do PWM with a ~ next to the pin designation, or look up the analogWrite() documentation page).
It's analogWrite(), not analogueWrite(), and not all Arduino pins are capable of PWM (most boards have marked the ones that can do PWM with a ~ next to the pin designation, or look up the analogWrite() documentation page).