Need help with our school project : can't make h bridge and motor work

Hi !
We've been working on a school project and would like to make a motor turn both ways at a varying speed with an h bridge.
Right now, we're only trying to test if it works correctly (without making the speed vary) with a rather simple program. However, we can't seem to get it right.
Our problem is that we ran the same tests last year for another project, and we had no problems. (We lost last year's program so we made another one, but I'm pretty sure it's basically the same)(I also don't think that the circuit is any different).
Here is the program we're using :

int in1 = 7;
int in2 = 8;

void setup() {
	pinMode(in1, OUTPUT);
	pinMode(in2, OUTPUT);
	digitalWrite(in1, LOW);
	digitalWrite(in2, LOW);
}

void loop() {
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
  delay(3000);
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  delay(6000);
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
  delay(5000);
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);
  delay(6000);
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
  delay(5000);
}

And here is our system :

There's probably something wrong, but we don't know what.

Thanks for your help ! :slight_smile:

(Apologies in advance if there are any spelling/grammar/whatever mistakes, english is not my native language)

EDIT : Nevermind we're just a little stupid, problem solved :sweat_smile:

Welcome to the forum

This could be part of your problem

image

Have you tried measuring the voltage at the battery terminals when it is powering your project ?

Such batteries are not designed to provide the sort of current required to run a motor. I assusme that the Uno gets its power from USB

Do you mind sharing what the issue was and how you solved it? Others can learn from it.