Can I connect the two L298N to Arduino?
it looks like you run out of pins to use
But remember different Arduinos have different numbers of pins.. 14 on an Uno which Geoff presumably based his numbers on, in the absence of the OP saying what his board is, but 50+ on a Mega.