Resistance Control

Hello. I was wondering how I could control the speed of a motor without a potentiometer. For example, I want to be able to be able to without manually moving anything, be able to have a motor start out spinning slowly, than faster, and faster.

Well, you wouldn't do it with resistance control, no matter what.
Use PWM controlling a N-channel MOSFET between motor '-' pin and Gnd.
Increase the PWM pulse-train width using analogWrite.

for (x=0; x<=255; x=x+1){
analogWrite (pinX, x);
delay (someAmount);
}

pinX = 3,5,6,9,10,11 for a '328P board
someAmount will determine how fast it ramps up.
You may want to find the value of x at which the motor actually starts moving and go from there instead of from 0.
Or you may have to give it a higher value to get it started and overcome static friction, then back the number down to the slow speed you want.

What kind of a motor? An AC motor, DC motor?

What if my dc motor requires too much power for the arduino to supply. Right now I have a transistor hooked up to my motor and a 9 volt battey, and a pin on my arduino.

Arduino can't suppy motor current, you'll kill the 5V regulator, or the reverse polarity protection diode.

Here's a couple of ways to connect things.
N-channel MOSFET such as AOI514 from digikey will work well and has a Logic Level gate so Arduino can drive it directly.


The battery- must connect to the Arduino Gnd.