When circuit connected by both GND and 5V stops

First of all, I'm kind of new to creating circuits and I'm trying to make a project that when I press one of the buttons it turns on the green LED and turns on the dc motor and when I press the other button it's opposite, red and off the motor. Like in the title says at the start and end of the circuit the Arduino board turns off which I'm presuming because it is too much or too little power to process. I tried using resisters: 1 330, 2 220 and 2 10K to try to lessen the power going through the circuit but it still won't work. Any advice/ help that will help it work thanks!


(Apologies that the wires are a bit messy)

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

The post will show you how to attach and place your images in your post.

We need a schematic for a start, not just a picture of your protoboard.

Thanks.. Tom... :slight_smile:

From one Arduino newbie to another (I did code for many years) I would suggest that you split the problem by testing individual bits frst.

Have you used the "blink" and "button" examples that come with the Arduino IDE to test that you understand how to set up the LEDs and button?

If they work you've at least reduced the scope of where the problem might be i.e. probably with the motor circuit/code. Sorry can't help with that.

In those pictures, it loojs like you have the 5v and ground wirea plugged into the same power rail, creating a short circuit.

As @DrAzzy has pointed out, you are shorting the 5V to gnd on the protoboard.

Tom… :slight_smile:
PS, use a graphic app to resize your images to under 1000 pixels.

Thank you, everyone, for replying, I will try to take on all of your points and try to fix it. :slight_smile: