The first wiring is bad. It shows a wire from driver +5 to UNO Vin. Completly wrong.
If the driver board produces 5 volt it should be connected to UNO 5 Volt pin.
The second drawing can work with 6 * 1.5 volt batteries.
The first wiring is bad. It shows a wire from driver +5 to UNO Vin. Completly wrong.
If the driver board produces 5 volt it should be connected to UNO 5 Volt pin.
The second drawing can work with 6 * 1.5 volt batteries.