Jamie77:
I am trying to run through serial and it works but the motor only stays on for a couple of seconds and goes off and I don't know how to keep it on.
Since you don't have any code to stop the motor except in a reset my guesses would be:
A) The motor is causing a load that causes a reset.
B) The motor may be drawing too much current and causing the controller chip to overheat and shut down.
Tgank you both for your answers. I currently have the arduino running off usb and the motor shield iz runnin on six AA nimh batteries. So its already running on sparate power supply. And just to double check that the code ia fine then.
Sorry I thought it was about motors but anyway so I do have enough power im gessig for 4.5v motor and if I add a capcitor where abouts do I put it and will this stop any problems.
Copy the Serial.print line you have in loop into the setup function and change the string it sends to something different. Make sure it's after the Serial.begin.
It does not seem to be resetting as it only prints the line once, but I have found that it crashed on the serial window after you put the command in a few times.
I suspect your issue is a lack of power, but there are other possibilities. Try a simpler sketch that just sets the speed and runs the motor forward in setup - not sure why you are using RELEASE.
Thank you for your response again. I have ran a simple code before and just done it again and the motor runs fine. One thing I have noticed that in the example adafruit give you they put a freqeuncy or something for each motor so I dont know if that has anything to do with it.