2 This sketch use a transistor and a diode
3 in order to poer a 5v ~150mAh directly from the board.
4 Hard thing is to find a suitable motor!
6 This version uses PWM for acceleration / deceleration
11 pinMode(motorPin, OUTPUT);
14 for(int motorValue = 0 ; motorValue <= 255; motorValue +=5){ // PWM up
15 analogWrite(motorPin, motorValue);
18 for(int motorValue = 255 ; motorValue >= 0; motorValue -=5){ // PWM down
19 analogWrite(motorPin, motorValue);