Hi
I'm trying to connect two lego motors to arduino using a motor shield. The motors are supposed to run on 9V each so I've tried boosting the voltage by connecting two 9V batteries to the vin on the screw terminals as well as by connecting a cable to the arduino itself. Nothing seems to be working, if I hold an LED to the pins connecting to the shield they light up as they should with the programme. Here is my code:
void setup() {
pinMode(12,OUTPUT); // a forward/backward
pinMode(13,OUTPUT); // b forward/backward
pinMode(11,OUTPUT); //a speed
pinMode(3,OUTPUT); //b speed
}
void loop() {
digitalWrite(12, HIGH);
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(12, LOW);
digitalWrite(13, LOW);
delay(1000);
}
(so basically a variation on the blink preset)
Any suggestions would be greatly appreciated, thanks!
Daisy