Low Power

I am trying to make a line following robot with the arduino Mega328. I have 5 line sensors, controlling a front wheel with a servo. There is 2 back wheels, hooked up to a regular motor, which is connected to port B of a sparkfun board. I have sufficient power to the arduino, however my motor is going very slow. It also almost comes to a stop when the servo has to move. Is it in my code, or should wiring most likely?

It is going to be difficult to provide a useful answer. It would be helpful to post a schematic (or at least block diagram) and your code. Nobody can suggest if the code is a problem, without seeing the actual code. (duh)

What are you using as your power source?

5 sensors? Seems like overkill. Lego brick things (RCS, NXT), can do line followers with just a single light sensor. Why so many?

It also almost comes to a stop when the servo has to move

To me that screams lack of current capability from the power supply. What are you using and how are you routing it?

You can't power a motor from an arduino pin.

Very true, let's hope he is not trying to but is using some form of driver:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
or
http://www.thebox.myzen.co.uk/Workshop/Motors_2.html

Mike,
I have Windows Vista IE8.
When I open your motor pages, the schematics show up right over the text, making the text not visible to read except along the right side for the narrower pic's.
Robert

Thanks, I did here that IE8 was faulty. Not sure what I can do about it as the page is perfectly legal CSS. I suppose at a pinch you could save the text from the web page and copy the pictures, but it is not very satisfactory. I don't know enough html to work out what is wrong with MS.
I understand that there is a newer IE than solves the problem.

Ironic isn't is after all the years of Microsoft blaming all the other browsers for being not compatible. Boot and other foot spring to mind.

How long has it taken you to create/develop all the stuff you have posted? That's an impressive collection.

I tried Chrome, the pages open okay there.

I hate it when MS clownifies up the layout & stuff in the supposed pursuit of improvements - just a big productivity step backwards as we try to figure again how to do the stuff we used to.

That's an impressive collection.

Thanks, I have been building it up over the last three years. There are several other pages I am trying to get up on various topics over the next month as well.
Did you find all of it? I know the navigation is not too easy, it comes of keeping the different strands separate, in boxes so to speak. However, I changed things a bit last week and so you should always be able to navigate to the central part at:-
http://www.thebox.myzen.co.uk

I have looked at different things at different times. You've made some interesting stuff.
I've been busy with fencing myself, www.crossroadsfencing.com, hoping to sign a lease today/tomorrow on a place of our own, then will have a place to permanently install this fencing stuff I've been working on since August, adding stuff as I go. Yesterday finished up wiring another card that will be allow me to detect touches on my own vs reading the output of another box & re-displaying its lights.
Wiring in some more connectors now to connect it all up.