void setup() { //Selecting PWM pin pinMode(6, OUTPUT); } void loop() { //the speed can be set from 0 to 255 as max. speed analogWrite(6, 150); }