Hi,
While it's a little hard to tell because there are so many wires, I double checked your circuit against the breadboard diagram and cannot immediately see anything wrong.
Unfortunately I leaving for the day and I am on vacation next week, and I'm the person at Science Buddies best equipped to help you with this project, but I will do what I can to leave some helpful advice, and then check in again when I am back:
1. As far as I can tell your switch is wired correctly. But you can eliminate the switch and just plug the jumper wires from the battery pack directly into the power and ground buses on the left side of the breadboard.
2. If you disconnect one of those wires, the motors should stop completely because they are not receiving any power.
3. If the motors still spin slowly even after pulling one of the battery pack wires, then they are
somehow receiving power from the 5V on your Arduino. This could be due to several possible causes, such as:
a) a wire in the wrong place that neither one of us is seeing
b) an internal short-circuit on a damaged H-bridge chip (possible if you accidentally connected the chip wrong at some point)
c) a short circuit in the breadboard itself somewhere (this is highly unlikely)
4) I know you said your code is the same as the example code, but another thing to look out for is to make 100% sure that the Arduino pins you are using to control the motor are set as outputs. Trying to use pins accidentally set as inputs to control a motor can result in strange behavior like the motor spinning slowly.
It is much easier to diagnose these problems if you have a multimeter. We have a detailed tutorial about how to use a multimeter here:
https://www.sciencebuddies.org/science- ... multimeter
You can use a multimeter to check for short circuits and to check for proper voltages (either 5V from the Arduino, or 6V when the battery pack is connected, depending on the pin/row). If for example you are measuring 5V between a pin and ground when the battery pack is disconnected, but you expect 0V on the pin (the H-bridge pins that are connected to the motors), that means there is a short circuit somewhere.
Assuming you purchased the Science Buddies kit, I would reach out to Home Science Tools, send them a link to this thread, tell them that you already talked to somebody at Science Buddies and ask them to send you a new H-bridge, as that may be the most likely culprit. If you purchased the parts on your own then you can purchase an extra H bridge. You might as well do that now since it will take a little time for the H-bridge to ship while you investigate the other possibilities.
Hope that helps - I will be back on September 3rd and will check this thread again then.