Can't get the motor started, Circuit 5A

My dad bought the sparkfun kit 15631 for me and I’m on Circuit number 5A, Motor Basics. I made all the necessary pin attachments and checked it 3 times. When I go to the Arduino IDE and run the code, it says:

Enter motor speed (0-255)... 
Motor Speed: 100
Motor Speed: 0
Motor Speed: 50
Motor Speed: 0

Basically, whenever I enter a number in the terminal it goes straight back to 0, and my motor doesn’t spin. And it doesn’t matter which direction I move the switch, it does this for either direction. I put a piece of tape on the axis. I tried changing the 0 in

if (Serial.available() > 0) { 

to a 1, and basically it stops immediately going back to 0 and just says motor speed 100 motor speed 50, but the motor still doesn’t run. What is the issue, and why was my code behaving that way to begin with? thanks :smiley:

Can you provide a picture of your setup? Also did you copy/paste the code, re-wrote it line by line, or used code provided online?

Also, try a motor speed of 255. The lower speeds sometimes won’t provide enough current to the motor to get it started turning but you can usually use them after the motor is spinning.

TS-Brandon:
Can you provide a picture of your setup? Also did you copy/paste the code, re-wrote it line by line, or used code provided online?

it doesn’t seem like I can upload pictures of any file extension, when I try it just says “HTTP error” and stops its progress… :confused: Can I email them to you?

I used the code online, and then tried copy and pasting it to see if that would fix it, and it didn’t…

Ok, I’m an idiot. I had all of the wires on the right side of the motor driver down one peg. THANK YOU!

I’m glad you figured it out. Good luck with your electronic travels.

thanks!