D.C Motor

hi all,

i'm quite new to arduino and i was wondering,

can anyone give me a code on how to make a motor start slowly, and accelerate to a faster speed? :~

thanks for any help

To start with, you could write a simple "for" loop that counts from 0 to 255, write the loop control variable to "analogWrite" and has a short delay within the loop.
Then the trick is to lose the "for" loop and the "delay" and do it properly.

Don't connect your motor directly to an Arduino output pin.

Adding to that:
What kind of motor? Does it only need to spin in one direction?