Arduino motorsheild

Hello

I`m familiar with arduino.
I bought a motorshield for the arduino and received it today.
When you place this shield on your arduino are you
unavailable to use normal pins of the arduino?
The shield is connected to many of arduinos pins so I was wondering how
to use arduino PINs for diffrent things than motorsheild.

Im planning to control a dc motor with a button, the code and everything else is ready except, I dont know how to use the PINs from the arduino anymore.

I found this:

What pins are not used on the motor shield?
All 6 analog input pins are available. They can also be used as digital pins (pins #14 thru 19)
Digital pin 2, and 13 are not used.

The following pins are in use only if the DC/Stepper noted is in use:
Digital pin 11: DC Motor #1 / Stepper #1 (activation/speed control)
Digital pin 3: DC Motor #2 / Stepper #1 (activation/speed control)
Digital pin 5: DC Motor #3 / Stepper #2 (activation/speed control)
Digital pin 6: DC Motor #4 / Stepper #2 (activation/speed control)

THIS MEANS I CAN USE PIN 3, 5 AND 6 IF I ONLY USE MOTOR #1
RIGHT???

DO I JUST SOLDER SOME WIRES ON TO THE MOTOR SHIELD?

The following pins are in use if any DC/steppers are used
Digital pin 4, 7, 8 and 12 are used to drive the DC/Stepper motors via the 74HC595 serial-to-parallel latch

I HAVE THIS ONE BY THE WAY:
https://www.google.no/search?q=l293d+motor+shield&espv=2&biw=1097&bih=554&source=lnms&tbm=isch&sa=X&ved=0CAcQ_AUoAWoVChMIysqK_IGdyQIVxicOCh2g9QO_

Best regards

You better not use the pins that are for the motors, they are connected.
If nothing is connected to the servo connectors, you can use those pins.

Pin 0 and 1 are in use for the communication to the computer.

All the analog pins can be used (A0 up to A5).
As you already found, they can be used as digital pins as well.
I prefer not to use pin numbers 14 up to 19, but I prefer 'A0' up to 'A5' in the sketch.

Pin 9 and 10 are for the servo motors, you can use them if no servo motors are connected.

Pin 2 is not used, and pin 13 is not used.

So you have 2, 13, A0 up to A5 and maybe 9 and 10. That's it.

The shield was designed by Adafruit : Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.2] : ID 81 : $19.50 : Adafruit Industries, Unique & fun DIY electronics and kits
They have now version 2 which doesn't need so many pins : Adafruit Motor/Stepper/Servo Shield for Arduino v2 Kit [v2.3] : ID 1438 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits

If you get something like this you can connect wires to the screw shield before you plug in your motor shield .

I offer one that will be more stable sitting on the Uno.
Kit or assembled board available.
http://wwww.crossroadsfencing.com/BobuinoRev17/

Thaks guys, maybe Ill just solder the wires onto the motorsheild. Im familiar with the soldering equipment.

I tried my code, but I get an error message.

I want to press a button to start the motor. It works when I plug my dc motor to the arduino uno and control it with a transistor but It wont work when I use it with the motorshield.

This is my code:

const int Knapp1 = 2;
const int Led1 = 3;
int buttonState = 4;

#include <AFMotor.h>
AF_DCMotor motor(1);

int led1styring = LOW;
int motor1styring = LOW;

void setup()
{
Serial.begin(9600);

pinMode(Led1, OUTPUT);
pinMode(Knapp1, INPUT);

motor.setSpeed(200);
motor.run(RELEASE);
}

void loop()
{

while(digitalRead(Knapp1)==LOW);

if (digitalRead(Knapp1)==HIGH)
{

led1styring=!led1styring; //ledstyring = LED steering
motor1styring=!motor1styring; //Motor styring = Motor steering

buttonState = digitalRead(Knapp1);

digitalWrite(Led1, HIGH);

motor.run(FORWARD);
{
motor.setSpeed(250);
delay(2000);
}

motor.run(BACKWARD);
{
motor.setSpeed(50);
delay(1000);
motor.run(RELEASE);
}

}

while (digitalRead(Knapp1)==HIGH);
digitalWrite(Led1,led1styring); //This works
digitalWrite(motor,motor1styring); //WHY ISNT THIS OKAY?!?!?! I GET AN ERROR MESSAGE

}

Highlight your code and clck on the CODE TAGS Toolbutton [<>] .It's one of the first toolbuttons on the left. Then click SAVE.

Like this:

 const int Knapp1   = 2;     
const int Led1     = 3;      
int buttonState    = 4;        


#include <AFMotor.h>
AF_DCMotor motor(1);

int led1styring = LOW;
int motor1styring = LOW;

void setup() 
{
  Serial.begin(9600);           
  
  pinMode(Led1, OUTPUT);
  pinMode(Knapp1, INPUT);
  
  motor.setSpeed(200);
  motor.run(RELEASE);
}

void loop() 
{


while(digitalRead(Knapp1)==LOW); 

if (digitalRead(Knapp1)==HIGH)
    {

led1styring=!led1styring;  //ledstyring = LED steering
motor1styring=!motor1styring; //Motor styring = Motor steering

 buttonState = digitalRead(Knapp1);
 
   digitalWrite(Led1, HIGH);

    motor.run(FORWARD);
        {
          motor.setSpeed(250);  
          delay(2000);
        }

    motor.run(BACKWARD);
          {
            motor.setSpeed(50);  
            delay(1000);
            motor.run(RELEASE);
          }


    }

while (digitalRead(Knapp1)==HIGH);
digitalWrite(Led1,led1styring);  //This works
digitalWrite(motor,motor1styring);  //WHY ISNT THIS OKAY?!?!?! I GET AN ERROR MESSAGE

}

Do you mean now or the next time? I highlighted it, but can`t find the toolbutton.

Best regards

I`ve soldered the wires, the light goes on and stays on until I press the button again. Works great.

Now I just have to figure out how the motor will start when pushing the button.
Anyone with ideas?

Thank you very much, best regards!
And by the way, I`m familiar with arduino used it before on a school project, take a look:

Do you mean now or the next time? I highlighted it, but can`t find the toolbutton.

Why not ? It's the FIRST toolbutton . TOP ROW LOOKS LIKE THIS -> "</>"

Now I just have to figure out how the motor will start when pushing the button.
Anyone with ideas?

According to the code it should be running when the led lights.
What are you using form motor power ?