Arduino Uno+Motor Shield+Velleman sample code not working



I am an absolute beginner and I have been trying to run a wiper motor connected to the VMA03 and Arduino Uno by using the sample Code which can be downloaded.

To run only 1 motor I deleted ever line in the code which refers to motor B.
When loading the code to the Shield the motor starts for the indicated time in the first direction. Then the motor stops and starts sputtering and keeps this way. One led light flashe red and a bit green.

In order to find out the error we checked the motor and shortend the Code. But it is still not working. Here is the short Code. Can anyone help, please?

int pwm_a = 3; //PWM control for motor outputs 1 and 2
int dir_a = 2; //direction control for motor outputs 1 and 2

void setup()
pinMode(pwm_a, OUTPUT); //Set control pins to be outputs
pinMode(dir_a, OUTPUT);

analogWrite(pwm_a, 255); //set motor to run at (100/255 = 39)% duty cycle (slow)


void loop()
digitalWrite(dir_a, LOW);
analogWrite(pwm_a, 255);

analogWrite(pwm_a, 0);




considering your code, this should run motor A at full speed (225) for about 20 seconds, then wait 5… and start allover, too bad you didn’t understand the original code, and deleted some clues on how to work this…

and ow yeah… you should have placed jumpers on PWMA 2 and DIRA 3…

btw… I have another thread with a working code example; go check that out… and take care of those jumpers… I hope you mounted the dual H bridge IC in good order…

regards and good luck…


sorry, correction…

jumpers should be on PWMA3 and DIRA2…

according to pinsettings in the code…



reading your original message again, I noticed you bought the VMA03 version which is already built; so the circuit must be OK…

my guess still is, your jumper settings are faulty… because this code definitely should give some result…

otherwise feel free, to use the code example I posted elsewhere…

you also mentioned a wiper motor… I do not know the specs on that one, but you have to realize that you may need an external power source to drive this thing; probably 12 or 24VDC or something, considering this wiper motor is meant for a car… your Arduino normally runs on 5V-7V from USB, so it wouldn’t surprise me your setup lacks the necessary power to drive this…

regards and good luck…


Hi, there,
Any one has video for setting up velleman K822?