knaving:
Paul__B, I'm building the code using what I've learned in class so far.
Aha! So, this is another college assignment, eh? So we are not ethically supposed to give you the full solution, but may (and will be happy to) guide you. Of course, you should expect your teachers to be monitoring these forums when they set such an assignment. 
knaving:
Teachers suggested using interrupts and that's all I know.
Oops! Teachers aren't "the full quid" then. Well, you might get away with some gross plagiarism. Maybe. 
knaving:
Is there a better way I could do this?
Well, there's a proper way to do it for a start. I haven't examined Robin's code precisely, but offer a core routine which you can try to demonstrate how a toggle button with proper debouncing should behave. Do try this out. Obviously it does not use interrupts in the code itself (but - the hidden libraries actually do but in a correct fashion!)
Note the usual considerations - you must not use digital pins 0 or 1 as you appear to have, for anything; I will leave you to research why. I have allocated the button to pin 10 Next, you do not have pushbuttons connected to Vcc, you connect them to ground and then you do not require a pull-up as it is built into the MCU if you simply enable it. My code will toggle the "L" LED.
// Button toggle with extreme reliability!
const int led1Pin = 13; // LED pin number
const int button1 = 10;
int led1State = LOW; // initialise the LED
char bstate1 = 0;
unsigned long bcount1 = 0; // button debounce timer. Replicate as necessary.
// Have we completed the specified interval since last confirmed event?
// "marker" chooses which counter to check
// Routines by Paul__B of Arduino Forum
boolean timeout(unsigned long *marker, unsigned long interval) {
if (millis() - *marker >= interval) {
*marker += interval; // move on ready for next interval
return true;
}
else return false;
}
// Deal with a button read; true if button pressed and debounced is a new event
// Uses reading of button input, debounce store, state store and debounce interval.
// Routines by Paul__B of Arduino Forum
boolean butndown(char button, unsigned long *marker, char *butnstate, unsigned long interval) {
switch (*butnstate) { // Odd states if was pressed, >= 2 if debounce in progress
case 0: // Button up so far,
if (button == HIGH) return false; // Nothing happening!
else {
*butnstate = 2; // record that is now pressed
*marker = millis(); // note when was pressed
return false; // and move on
}
case 1: // Button down so far,
if (button == LOW) return false; // Nothing happening!
else {
*butnstate = 3; // record that is now released
*marker = millis(); // note when was released
return false; // and move on
}
case 2: // Button was up, now down.
if (button == HIGH) {
*butnstate = 0; // no, not debounced; revert the state
return false; // False alarm!
}
else {
if (millis() - *marker >= interval) {
*butnstate = 1; // jackpot! update the state
return true; // because we have the desired event!
}
else
return false; // not done yet; just move on
}
case 3: // Button was down, now up.
if (button == LOW) {
*butnstate = 1; // no, not debounced; revert the state
return false; // False alarm!
}
else {
if (millis() - *marker >= interval) {
*butnstate = 0; // Debounced; update the state
return false; // but it is not the event we want
}
else
return false; // not done yet; just move on
}
default: // Error; recover anyway
{
*butnstate = 0;
return false; // Definitely false!
}
}
}
void setup() {
pinMode(led1Pin, OUTPUT);
pinMode(button1, INPUT);
digitalWrite(button1,HIGH); // internal pullup all versions
}
void loop() {
// Toggle LED if button debounced
if (butndown(digitalRead(button1), &bcount1, &bstate1, 10UL )) {
if (led1State == LOW) {
led1State = HIGH;
}
else {
led1State = LOW;
}
digitalWrite(led1Pin, led1State);
}
}
knaving:
Do you at least agree with KenF that a separate power source is needed? Could you offer a solution to my problem?
You absolutely must not expect the Arduino regulator to power anything other than a simple indicator LED - and even that with care. Of course you need a separate supply for the motor.
You would only have to add your potentiometer reading and PWM code into the example I gave and alter the output pin allocation to completely solve your problem as stated. Another hint - only alter the AnalogWrite if the potentiometer value actually changes - and even then it would probably be a good idea to average it over several readings.