UKHeliBob:
The fact remains that neither sketch uses 3 pins defined as outputs to control the shield......You need to start with simple sketches that run the motor(s) and work from there
Try thisint motorA_dir = 12; //direction
int motorA_brake = 9; //brake
int motorA_speed = 3; //speed
void setup()
{
pinMode (motorA_dir, OUTPUT); //set 3 pins to be outputs
pinMode (motorA_brake, OUTPUT);
pinMode (motorA_speed, OUTPUT);
digitalWrite(motorA_dir,HIGH); //direction 1
digitalWrite(motorA_brake,LOW); //brake off
for (int motorSpeed = 0;motorSpeed <=255 ;motorSpeed++)
{
analogWrite(motorA_speed, motorSpeed); //set the motor speed
delay(100); //slow down the for loop a little
}
analogWrite(motorA_speed, 0); //let the motor coast to a stop
}
void loop()
{
}
One motor should run up from its slowest speed to its highest then stop. Note how giving the Arduino pins names helps to make the code more readable.
I see what you are saying. I will give that a go as well, so obviously the sketch you provided is for a single motor, but once I get at least one working then it is a matter of adding the second..