DCmotor help

im trying to make a dc motor run in one direction Circut:

i have a 2.5v dc motor postive connected to pin 2 and the negative is conneted to ground

Code:

int dcmotorPin = 2;

void setup() { pinMode(dcmotorPin, OUTPUT); } void loop() { digitalWrite(dcmotorPinn, HIGH); delay(5000); digitalWrite(dcmotorPin, LOW); delay(1000); }

its supposed to turn the motor on for 5 sec then turn off for one.

Im a little bit of a newb so please help.

What Richard is saying is that an Arduini pin can only source 40mA of current and that almost all Dc motors will draw (much) more.

Trying to drive your motor directly with an Arduino pin can damage (or destroy) your Arduino board.

You probably need some kind of transistor to drive it.

Google Arduino DC motro to find a truckload solutions.

I'd second (or is that "third"?) that - even the tiny vibra motors in phones can draw over 100mA.

Google Arduino DC motro to find a truckload solutions

Or even "motor" :D

Or look at my web page:- http://www.thebox.myzen.co.uk/Workshop/Motors_1.html