I am trying to connect a DC motor to an arduino.
When I set it up like in the first image below, it works and the motor rotates. However, when I set it up in the second image it does not work, am I missing something really obvious? Any help would be great..
Code I am using for image 2:
int pinMe = 11; // the pin we will use as output
void setup() {
// put your setup code here, to run once:
pinMode(pinMe,OUTPUT);
digitalWrite(pinMe,HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(pinMe,HIGH);
}
Also when I check the voltage in the second image from pin 11 to ground it reads 4.98V but when I add the two wires from the motor to the bread board (in image 2) the voltage reads 0.14V