analogWrite(ledPin, 10);
delay(300);
analogWrite(ledPin, 8);
delay(300);
analogWrite(ledPin, 6);
Please Modify your post and highlight all of your code, then press the # button in the editor. Those awesome smilies will go away and we can read your code.
How is your motor wired?