analogWrite on pin 8

not all pins are PWM pins - usable with analogWrite() . On the arduino board you can see a ~ near the pinnr.

pwm pins = { 3, 5, 6, 9, 10, 11 }