After alot of playing around I've finally got something that has worked(Although my guess is I'm still doing something dumb). Below is the schematic...I didn't bother posting a video since it would just be a motor going slow and then fast, and the source code is really simplistic as well for the microcontroller.
Some things I found, that may or may not be correct:
- Needed two 9V batteries to get enough current to power the motor at full speed and keep the circuit operational. I'm running them in parallel although this may be incorrect. Running with one battery lets me only get about 1/3 of the top speed till the rest of the circuit dies.
- Switching and current work together to make transistors become incredibly hot. So for example I tried doing something like switch the transistor on one cycle, off the next cycle, and repeat forever to achieve half power. Bad mistake that resulted in a minor burn, the constant switching with current to drive the motor about blew the transistor. Now I'm switching twice per 10000 cycles, so if I want half power I do 5000 consecutive cycles on, and 5000 consecutive off.
- Motors can get stuck, with very negative consequences! If you use really low power the motor will jam until either it's getting enough current to break free or until you rotate it into working. This doesn't seem at all bad, until you realize it sucks in heroic amounts of current trying to turn itself in the meantime. This causes the power on everything else to go out, the transistor to burn up, and even the power source to get overheated. Lesson is, unless it's a stepper motor, it should be going a decent speed to be in use.