Power supply for arduino and L298N

Hi,

I'm trying to control 2 motors with arduino and a L298N Dual H bridge motor driver.

I've seen similar projects using 2 power supplies, one for arduino, and another for the L298N, but I would like to use only one power supply.

I searched a bit about this and it seems possible, although, I'm not certain how, since I'm a newbie.

I have a battery pack that consists of 6 AA batteries, would it be possible to power both arduino and the motors with this?

If so, how do connect the battery to the L298N and arduino?

Also, on the description of the L298N driver motor I found:
"Note:This module has a built-in 5v power supply, when the driving voltage is 7v-35v, this supply is suitable for power supply
DO NOT input voltage to +5v supply interface, however ledding out 5v for external use is available."

Does this mean, that I could take my 6 AA (7.8V) battery pack, connect it to the L298N, and power arduino from the 5V line on the driver motor?

Thanks for the attention

If you use a L298N Breakout board like this one,

There are two pins, one is VCC, one is +5V and another one is of course GND.

Now you can see there's a white switch. If you connect your battery [up to 36V, not sure; check datasheet] with VCC and GND and turn on the switch. The motor driver will take necessary logic supply automatically.

If you turn off your switch then you need to supply +5V and VCC separately for the motor driver and the motors.