Okay so the problem is: Given the following code and schematic (which i've built together), instead of the motor being off initially, it's on.
int motor = 8;
void setup() {
pinMode(motor, OUTPUT);
digitalWrite(motor, LOW);
}
// the loop routine runs over and over again forever:
void loop() {
}
If the transistor is an NPN transistor, the Fritzing (motto: "confusing, extremely poor quality circuit diagrams for idiots") suggests that you have no base resistor. That may have destroyed the output pin. Use 220 Ohms minimum.
It also suggests that you are powering the motor from the Arduino, which can actually destroy the Arduino. Use a separate power supply and connect the grounds together.
You are getting some extremely bad advice from somewhere.
Can you provide me a diagram of what would fix the problems you have listed? Ex: where would I put the resistor? And for the external power, would should I buy and how would I attach it?
You may have already damaged the Arduino irreparably, but a proper tutorial is here (scroll down to motor control). However, it is better to have a reversed diode across the motor, than the capacitor labeled C1.
I changed up the original post which narrows down the problem alot. Hope it's descriptive now.
And made a nonsense of my Reply #1 in the process.
Don't make big changes to posts - correcting typos is OK. Put new material in a new Reply to maintain the chronological sense of the Thread so other readers can follow it.